in reply to Re^2: open with pipe
in thread open with pipe

Sure, close can wait for "-|". But why not waitpid?
$ perl -E' $pid = open(my $pipe, "-|", "perl -e'\''sleep 5; exit 3'\''"); say time; waitpid($pid, 0); say time; say $?>>8; ' 1280685258 1280685263 3

waitpid is documented with:


Replies are listed 'Best First'.
Re^4: open with pipe
by ikegami (Patriarch) on Aug 02, 2010 at 03:40 UTC
    Calling waitpid twice for the same process doesn't seem right to me.