If running a program with a fork/exec within a mod_perl handler (not the
best thing to do in mod_perl) with the following code:

     my $pid = open( PROG, "-|" );

     if ($pid) {
         while (<PROG>) {
             [..]
         }
     close( PROG ) or log_message( "failed close on program $! $?");

What's the proper way to close/kill PROG _early_ before PROG has finished
with it's output.  I keep getting SIGPIPE errors ($? = 13) returned if I
close before PROG is finished.

I could kill( 'HUP', $pid ), instead of calling close() but then would I
leak file handles?  Calling kill doesn't seem like a the best solution.

Thanks,

Bill Moseley
mailto:[EMAIL PROTECTED]

Reply via email to