On Fri May 25 06:08:13 2012, worldmind wrote: > Птн. Май 25 04:21:50 2012, LeonT писал: > > On Tue, May 22, 2012 at 5:05 PM, Leon Timmermans <fawaka@gmail.com> > > On second reading, that does not seem necessary. The process will > > receive a sigchild under these circumstances, but waitpid will ignore > > that status unless asked for it (using the WUNTRACED and WCONTINUE > > options). > > As I understand you say that we can skip WIFEXITED($?) and > WIFSIGNALED($?) checking, but we will get STOP signal and process it > like child exiting. > Simple example in attached file: I don't think this answers Leon's objection - waitpid() will only return the child process id on a STOP if you supply WUNTRACED in options. If you modify your code to check waitpid: $SIG{CHLD} = sub { my $pid = waitpid(-1, WNOHANG); if ($pid > 0) { warn 'Get CHLD signal ', $pid; } }; then you don't get the warning on a STOP. That said, the waitpid() loop is required (which the cookbook doesn't seem to use.) Tony --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=113028Thread Previous