>      my $pid = open( PROG, "-|" );
>      if ($pid) {
>          while (<PROG>) {
>              [..]
>          }
>      }
>      close( PROG ) or log_message( "failed close on program $! $?");
>
> I keep getting SIGPIPE errors ($? = 13) returned if I
> close before PROG is finished.

Maybe a reaper is needed here?  From perlipc:

    sub REAPER {
        $waitedpid = wait;
        # loathe sysV: it makes us not only reinstate
        # the handler, but place it after the wait
        $SIG{CHLD} = \&REAPER;
    }
    $SIG{CHLD} = \&REAPER;
    # now do something that forks...

ELB

--
Eric L. Brine  |  Chicken: The egg's way of making more eggs.
[EMAIL PROTECTED]  |  Do you always hit the nail on the thumb?
ICQ# 4629314   |  An optimist thinks thorn bushes have roses.

Reply via email to