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

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

Thread Previous
From:
Tony Cook via RT
Date:
September 20, 2013 04:49
Subject:
[perl #74854] wait and waitpid can return -1 even when there are running child forks.
Message ID:
rt-3.6.HEAD-1873-1379652575-292.74854-15-0@perl.org
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

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=74854

Thread Previous


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