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

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

Thread Next
From:
Charlie Strauss
Date:
September 20, 2013 06:31
Subject:
Re: [perl #74854] wait and waitpid can return -1 even when there arerunning child forks.
Message ID:
84626FB3-B426-4F18-B44A-1E369CE8A72F@mac.com
Blast from the past!  Could you send me back my script and I'll test it if I can.   I don't have that version of ubuntu or osx any longer.



On Sep 19, 2013, at 10:49 PM, Tony Cook via RT <perlbug-followup@perl.org> wrote:

> On Sun May 02 12:08:18 2010, cems@mac.com wrote:
>> This is a bug report for perl from cems@lanl.gov,
>> generated with the help of perlbug 1.39 running under perl v5.8.9.
>> 
>> FROM: charlie strauss, cems@lanl.gov
>> 
>> perlbug:  wait and waitpid can return -1 even when there are running
>>   child forks.  This happens any
>> time a kill signal is sent to a previously reaped child process ID
>>   from inside the parent fork.
>> 
>> tested on platforms:
>> 
>> 1) mac osx 10.5.10  Darwin Kernel Version 9.8.0 perl  v5.8.9 built for
>>   darwin-2level
>> 
>> 2) Linux 2.6.31-20-generic #58-Ubuntu SMP
>> 
>> Expected behaviour:
>> 
>> if a parent waits on children then I expect that
>> 1) the wait() command should block till a child exists (or SIGCHLD).
>> 2) the wait() command should never return -1 if there are unreaped or
>>   running children.
> 
> I tested with your script under both Linux (3.2.0 kernel) and OS X
> 10.7.5 and in neither case did it report "Perl bug detected!!".
> 
> On OS X I tested the system perl 5.12.3 and bleadperl.
> 
> On Linux I tested 5.18.1 and bleadperl.
> 
> Does the problem still occur for you with a current perl?
> 
> Tony

Charlie Strauss
cems@me.com



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