In perl.git, the branch smoke-me/tonyc/pclose-loop has been created

<http://perl5.git.perl.org/perl.git/commitdiff/ee236b46605914e09328c72f9f08281e6dcfd754?hp=0000000000000000000000000000000000000000>

        at  ee236b46605914e09328c72f9f08281e6dcfd754 (commit)

- Log -----------------------------------------------------------------
commit ee236b46605914e09328c72f9f08281e6dcfd754
Author: Tony Cook <[email protected]>
Date:   Thu Oct 10 17:19:36 2013 +1100

    [perl #119893] avoid waiting on pid 0
    
    When a filehandle is cloned into a standard handle, do_openn() copies
    the pid from the original handle in PL_fdpid to the standard handle
    and zeroes the entry for the original handle, so when the original
    handle was closed Perl_my_pclose() would call wait4pid() with a pid of 0.
    
    With v5.19.3-614-gd4c0274 I modified wait4pid(), perl's waitpid/wait4()
    wrapper, to allow a pid of zero through to the actual system call when
    available.
    
    These combined so that following v5.19.3-614-gd4c0274 in some
    circumstances closing the original handle would block by calling
    waitpid(0, ...) or wait4(0, ...), which waits for any child process in
    the same process group to terminate.
    
    This commit changes Perl_my_pclose() to wait for the child only when
    the stored pid is positive.
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to