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 Previous | Thread Next
From:
Nicholas Clark
Date:
September 20, 2013 12:35
Subject:
Re: [perl #74854] wait and waitpid can return -1 even when there arerunning child forks.
Message ID:
20130920123454.GO66035@plum.flirble.org
On Fri, Sep 20, 2013 at 01:29:31PM +0100, Nicholas Clark wrote:
> On Fri, Sep 20, 2013 at 02:22:09PM +0200, Andreas Koenig wrote:
> > "Father Chrysostomos via RT" <perlbug-followup@perl.org> writes:
> > 
> > > I get the bug on 5.8.8, but not 5.8.9.  Bisecting will take a long time,
> > > as it requires a human slave.
> > 
> > No need for slaves, the answer is perl-5.8.8-990-g5f42405.
> 
> Or this one in blead
> 
> commit 48dbb59ed9af112b035bdcc063c1471a22ec25a2
> Author: Steffen Ullrich <coyote.frank@gmx.net>
> Date:   Tue Feb 26 20:43:00 2008 +0100
> 
>     Re: interrupting system() with signal depends on signal handler
>     Message-ID:  <47C45DB4.9060306@gmx.net>
>     
>     p4raw-id: //depot/perl@33408
> 
> diff --git a/util.c b/util.c
> index 36166fb..82f147e 100644
> --- a/util.c
> +++ b/util.c
> @@ -3011,6 +3011,7 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
>  #endif
>      if (result < 0 && errno == EINTR) {
>         PERL_ASYNC_CHECK();
> +       errno = EINTR; /* reset in case a signal handler changed $! */
>      }
>      return result;
>  }
> 
> 
> However, there is still a long hang at the end of the test script at that
> revision, whereas blead exits quickly.

No, it doesn't. Not sure why I thought that.

OK, I think that this bug is resolved.

(But it's strange that it shows up in a (seeming) 5.8.9. perlbug from a
different version from the tested version?)

Nicholas Clark

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