Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: fork-bomb!

by Eimi Metamorphoumai (Deacon)
on May 01, 2003 at 17:37 UTC ( #254735=note: print w/replies, xml ) Need Help??

in reply to fork-bomb!

I'm an admin on a few systems that get fork-bombed accidentally a few times a semester (big computers used by students in begining OS courses). There is something you can do if you catch it while it's going on, though, as long as you do a little planning ahead. On those machines I keep about four shells nested.
exec tcsh set prompt="THIS IS YOUR LAST SHELL# " tcsh tcsh tcsh tcsh
(cut and paste into the terminal). Then if I notice the machine is going to Hell, I can "exec top" and "exec pkill -u person" and things like that. Although you can no longer get any new pids, you're quite free to sacrifice shells for that one last desperation command. Just a little tip, in case anyone is interested.

Replies are listed 'Best First'.
Re: exec, nested shells
by Xanatax (Scribe) on May 04, 2003 at 19:50 UTC

    ok, _that_ was what is was trying to find info on! couldn't figure out how to burn the pids i still had in shells on things like kill or shutdown. thanks!

    the nested shells is a neat idea also... actually, that's really easy and convenient to setup with 'screen' also. i generally end up with at least eight shells running because of wonton use of windows in screen, so having spare pids is more likely than not.

    i just added an init line to the system to make screen start a half-dozen shells for the root account, so as long as i have a connection to the machine i will have those available for emergencies.

    -- Xanatax.

Re^2: fork-bomb!
by Hue-Bond (Priest) on Sep 11, 2005 at 18:55 UTC

    One could also use psh and exploit the feature of being able to execute Perl code without forking.

    David Serrano

Re: Re: fork-bomb!
by Juerd (Abbot) on May 02, 2003 at 07:49 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://254735]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2023-02-09 00:15 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (44 votes). Check out past polls.