From: ani0349@cs.rit.edu (Anatoly N Ivasyuk) Subject: Re: Killing the system Date: 16 Jul 1992 11:20:49 GMT
In article <1992Jul16.013317.6678@athena.mit.edu> klaus%eccx.dnet@esu36.cfsat.honeywell.com (All you touch & all you see is all your life will ever be.) writes:
>
>void main(){
> while(1) fork();
> }
>
>I am new to UNIX, but it seems to me that this sort of thing should
>be protected against. I ran it as a regular user and managed to
>lock up every vc and prevent further logins. How do commercial
>UNIX's prevent this sort of thing?
>
>Todd.Klaus@esu36.cfsat.Honeywell.COM
Surprise! Unless the particular flavor of *nix has a per-user
process limit, most *nixen don't and can't really protect themselves
from such a thing. Or at least I never heard of one that did.
The program will fork until it reaches the limit of processes allowed
by the kernel.
A friend of mine accidentally did something similar last year (he
forgot to put in wait() ), and completely locked up one of the VAXen
here on campus.
So unless you want to receive plastic forks as Christmas gag gifts,
don't do it!
-Anatoly