Fork Bomb and why it doesn't happen on BSDs

Aleksandar Milivojevic amilivojevic at pbl.ca
Mon Mar 28 14:25:20 UTC 2005


Ow Mun Heng wrote:
> On Fri, 2005-03-25 at 10:28 +0800, Ow Mun Heng wrote:
>>I see.. So, ulimits _are_ set by default(lower) in *BSDs and not as what
>>I thought that they had some kind of process watchdog in place.

Yes.  They are hard coded in kernel.  If you want to raise them, you 
need to recompile the kernel.

> One more thing, what about if there are 20 users and all the 20 users
> try to fork at the same time? What will happen then?

They would create 20*64=1280 processes.  You'd log in as root (would be 
painfully slow, but possible), and kill them.

-- 
Aleksandar Milivojevic <amilivojevic at pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7




More information about the fedora-list mailing list