in reply to Re: why does ignoring sigCHLD corrupt return value from system()?
in thread why does ignoring sigCHLD corrupt return value from system()?
By replacing your instruction with system("./prog2.pl") I get a return code of 5 both with and without SIGCHLD ignored.
But what did you get before you made that replacement? I'm guessing -1 in both cases and that your platform just isn't one of the ones that exhibits this.
By the way, why should ignoring SIGCHLD be recommended when using system? Never heard that...
I don't think that such a "recommendation" is suggested by the original post. I doubt he was ignoring SIGCHLD because he was using system(); I'd bet he just ran into this in a program that happened to do both. So, the question is: must we recommend never ignoring SIGCHLD when using system()?
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: why does ignoring sigCHLD corrupt return value from system()?
by TheHobbit (Pilgrim) on Nov 05, 2003 at 10:14 UTC | |
by sauoq (Abbot) on Nov 05, 2003 at 11:11 UTC |