shrubbery has asked for the wisdom of the Perl Monks concerning the following question:
I'm working on a .pm module that needs to execute code and had the following problem. First, I use
$pid = open (H, "$command |");
The problem is, I set SIG{CHLD} = 'IGNORE' in order for the process to not zombie. If I don't set SIGCHLD, then the return codes come back grandly and all I have to do is $? >> 8. But with SIGCHLD set, I get "-1" back always if the child exits cleanly.
My question is, is there a way to get that executed child's return code with SIGCHLD set to IGNORE???
Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(sacked) Re: SIGCHLD and return codes
by sacked (Hermit) on Nov 16, 2001 at 22:14 UTC | |
by shrubbery (Acolyte) on Nov 17, 2001 at 00:30 UTC | |
by sacked (Hermit) on Nov 17, 2001 at 00:50 UTC |