develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #74854] wait and waitpid can return -1 even when there are running child forks.

Thread Previous | Thread Next
From:
Andreas Koenig
Date:
September 20, 2013 19:08
Subject:
Re: [perl #74854] wait and waitpid can return -1 even when there are running child forks.
Message ID:
87bo3nfh1f.fsf@k85.linux.bogus
"Father Chrysostomos via RT" <perlbug-followup@perl.org> writes:

> Thank you.  How did you manage that?  With an Expect script?

No, with a system() injected further up in the script. Here is the
relevant change:

-
-unless ($pid1) {
+if ($pid1) {
+system "/bin/sh -c '(sleep 4 && kill -CONT $$ && kill -CONT $$ && kill -CONT $$ && kill -CONT $$ && kill -QUIT $pid1)' &";
+} else {
 exec @command1;
 };
 

-- 
andreas

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About