Nasty fork() bomb
From: Sudheer (sudheerreddy.p_at_gmail.com)
Date: 02/07/05
- Next message: Bern: "Monitoring a binary"
- Previous message: Dirk Gouders: "Re: Rsync prune entire subtree, not just pattern"
- Next in thread: Laurenz Albe: "Re: Nasty fork() bomb"
- Reply: Laurenz Albe: "Re: Nasty fork() bomb"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 7 Feb 2005 06:34:06 -0800
Hello Everyone,
I have a program which forks for 5 times. Its children fork 5
times. These children fork five times.... This is done 10 times. The
10th generation just exit. This causes about 5^10 + 5^9 + 5^8 + ... +
5 forks.
After this the machine freezes for about 30 mins and then
comes to normal state. Conceptually, fork() after creating huge no of
child, fails with ENOMEM/EAGAIN. But even after exiting the machine is
taking long time to come to normal state. Why is this happening? how
can we avoid?
I am new to unix system progamming! Help me out.
Thanks
- Next message: Bern: "Monitoring a binary"
- Previous message: Dirk Gouders: "Re: Rsync prune entire subtree, not just pattern"
- Next in thread: Laurenz Albe: "Re: Nasty fork() bomb"
- Reply: Laurenz Albe: "Re: Nasty fork() bomb"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|