in reply to Re: Ulimit makes program hang (bug)
in thread Ulimit makes program hang
You can easily test it. Copy the program, so you have foo calling itself and bar calling itself. Now do from on shell:
This will print a bunch of pids, and the program "hangs". Now from another shell do:(ulimit -u 50 ./foo)
This will print 10 or less pids, and it hangs. Go back to the first window, kill the program, and issue a killall foo (or whatever is the equivalent on your system). Watch the output of the bars.(ulimit -u 60 ./bar)
When reaching the maximum amount of processes set by ulimit, fork() blocks till another slot becomes available.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Ulimit makes program hang (bug?)
by tye (Sage) on Aug 13, 2008 at 20:11 UTC | |
by JavaFan (Canon) on Aug 13, 2008 at 20:36 UTC | |
by memo2005 (Initiate) on Aug 14, 2008 at 08:19 UTC |