for(;;) fork();

Raulin Olivera raulin at tdl.UUCP
Fri Mar 31 01:59:19 AEST 1989


In article <2464 at netmbx.UUCP>, blume at netmbx.UUCP (Heiko Blume) writes:
> 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 ?




Did you try useing a kill 0?  It is supposed to kill everything that
you initiated.  You might add the nice to raise the priority.  As far
as not dying I suggest that you check the HUPCL settings in gettydefs.


		=Ralo->



More information about the Comp.unix.xenix mailing list