> > *** DO NOT TRY THIS UNLESS YOU WANT TO REBOOT ***
> > Here's my script:
> > #!/bin/bash
> >
> > while [ 1 ]; do
> > # Make a copy
> > cp corewar corewar.$$
> >
> > # Run it
> > ./corewar.$$ &
> >
> > # Start over
> > done
> >
> > *** DO NOT TRY THIS UNLESS YOU WANT TO REBOOT ***
> >
> > Here's the challenge: how do you clean up these processes without
> > using init 0, init 1, init 6, reboot, or shutdown?
> >
> > Now I'm guilty of #3, above.
> >
> > George
> >
>
> Use one of the bootable business cards. Boot that, mount your drive,
> remove the script, reboot..
>
> yeah? or did I miss the point?
yep. (-= Removing the files on disk is easy, the challange is to get them
out of memory without rebooting. Of course that script is the hard way to
do it...
perl -e 'while (1) { fork(); }'
That would do the trick; after a fairly short period of time (seconds)
init will puke on you, and after that it's pretty much time for a hard
boot unless you have the magic kernel key. The best part is you can do it
as a normal user on virtually any platform! (there are a few that will
limit how many processes a user can have, but generally even the systems
that can set that don't).
Of course all of this is for educational purposes only, but it is fun to
try, and watch what your computer does when it's dead. (-=
--Nick