in reply to Re: rsh <defunct> processes appear when using fork and system calls
in thread rsh <defunct> processes appear when using fork and system calls
Although I have experience with perl, I am a novice in forking processes, etc. So i don't know if this is the best, in my case 'best' means stability, code for doing what I want to do.
My reasoning for having the child wait for the grandchild is two-fold. One the grandchild is a non-perl program that runs for ~1 minute. So if I didn't use 'system', which forks and waits for its child to finish, and used 'exec' instead (which as I understand it just executes the command, and does not wait for its child to finish) then I would put multiple jobs (each needing heavy CPU usage) running on one node, instead of running them serially. This is extremelly undesirable outcome for me. The second reason I have the child wait for the grandchild is that I need to analyze the output of the 24 non-perl programs when they are finished, the only way I know how to do that is in side the child signal reaper.
Please let me know if my assumptions above regarding 'exec' are incorrect. If I could use your suggestion and get rid of the defunct rsh processes, while still meeting the criteria above, please let me know.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: rsh <defunct> processes appear when using fork and system calls
by cdarke (Prior) on Aug 07, 2007 at 12:53 UTC |