in reply to Re^2: system() returns -1 with $SIG{CHLD}?
in thread system() returns -1 with $SIG{CHLD}?
This was just a sample piece of code distilled down from a much larger perl program. In the big program, I'm running commands in the background, that take an arbitrary amount of time to complete. I don't want to be leaving any zombie processes around, so I used wait() with $SIG{CHLD} to mitigate this.
Should I be doing something differently here, or should I be responsible for managing the handling of $SIG{CHLD} whenever I want to run a system() command?
update: The zombies are left after forking a background process, not using system. I didn't make that clear
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: system() returns -1 with $SIG{CHLD}?
by ikegami (Patriarch) on Feb 11, 2009 at 22:02 UTC |