for(;;) fork();

Heiko Blume blume at netmbx.UUCP
Tue Mar 28 03:12:02 AEST 1989


i recently caused some bad load plus angry root on this machine 
(286 xenix 2.2.1) because i compiled the wrong thing by chance.
it was the common process well
main() {
	for (;;) fork();
}
which, of course, caused the no more processes message. i thought
'no problem', hung up the phone and redialed. the beasts were still
running ! and it was impossible to kill them because kill seems
to be too slow (one syscall for each pid) to that effect that the
forkers had enough time to spawn again before all of em got the signal.
the machine had to be rebooted.
the question is: why did they survive the logout ? they were not nohup.
(don't try this if you can't reboot, it's a real pain for the machine).
perhaps they could have been killed if the kill would run at top priority ?
-- 
Heiko Blume,Seekorso 29,D-1000 Berlin 22,VOICE=(+49 30)365 55 71,BBS=()365 75 01
TELEX=183003 intro d,FAX=()882 50 65|ARPA  =crash!pnet01!pro-cess!blume at nosc.mil
PSI  =PSI%45300043109::netmbx:blume |BITNET=pro-cess.UUCP!blume at PSUVAX1
UUCP =blume at netmbx.UUCP             |INET  =blume at pro-cess.cts.com



More information about the Comp.unix.xenix mailing list