in reply to What happens to a '-|' (pipe) file handle across a fork()?

Yeah, the change in Perl such that even the implicit closing of a popen-like file handle waits for the child to exit was a pretty sucky change in my book. For a very long time in Perl's history, only an explicit call to close would cause the wait. Super easy to get deadlock-like hangs with a modern Perl.

- tye        

  • Comment on Re: What happens to a '-|' (pipe) file handle across a fork()? (misfeature)

Replies are listed 'Best First'.
Re^2: What happens to a '-|' (pipe) file handle across a fork()? (misfeature)
by pprindeville (Novice) on Nov 08, 2015 at 21:11 UTC
    Yeah, the change in Perl such that even the implicit closing of a popen-like file handle waits for the child to exit was a pretty sucky change in my book.
    Agreed. Sounds like a case of Perl trying to take care of too much for the programmer. Also sounds like there should be a method like:
    $pipe->nowait(1);
    to get around this.
Re^2: What happens to a '-|' (pipe) file handle across a fork()? (POSIX::close())
by Anonymous Monk on Nov 08, 2015 at 21:40 UTC
    POSIX::close()?