Re: Dr. Evil typed sleep 666; rm -rf /



Mon, 11 Feb 2008 10:03:20 +0000, Stephane Chazelas did cat :

On Sun, 10 Feb 2008 07:52:17 +0800, jidanni@xxxxxxxxxxx wrote:
Gentlemen, Dr. Evil has typed
# sleep 666; rm -rf /
on my keyboard and went off to buy milkshakes. How can I stop the
impending doom?
C-c C-c, but some files still will get hurt. There is no break key etc.
The computer is not nearby.

bash is the only shell that will run "rm" if you interrupt "sleep" with
C-c.

All the other shells including the Bourne shell, ksh88, ksh93, pdksh,
zsh, csh, tcsh, rc, es and their derivatives will not unless Dr. Evil
has installed a trap on SIGINT.

With bash, you'll have to kill bash from another shell.

On a tty, provided the STOP and START C-s and C-q are mapped
it's still possible to operate:

instead of the doomed:
------------
# sleep 666; rm *; echo "WAM"
C-c
WAM
------------

do it within the grace notes moment (note the doubled C-c):
------------
# sleep 666; rm *; echo "WAM"
C-s C-c C-c C-q
------------

Now, this is all supposing the OP question was just a mind game or
a stupid joke from a skkkriptkiddy, if it was intended in real life to
do real damage I bet there'd be traps on the signals and mappings
of the keyboards... And I'd suppose the DrStoop wouldn't try to come back
home after he finished the milkshakes ;->
.



Relevant Pages