in reply to Re: Re: Pipe, fork, exec and red-hot pokers.
in thread Pipe, fork, exec and red-hot pokers.
my $STDOUT = IO::Handle->new; my $STDERR = IO::Handle->new; open($STDOUT, ">&STDOUT") || croak( 'Cannot duplicate STDOUT to file handle - ', $! ); open($STDERR, ">&STDERR") || croak( 'Cannot duplicate STDERR to file handle - ', $! ); $STDOUT->autoflush; $STDERR->autoflush;
If you still have no joy with this, you may have to incorporate a flush of the respective buffer prior to reading from it. eg. $STDOUT->flush. This may be necessary if some_application is actively buffering its output.
I'd be very interested to hear how you go with this and see if this resolves your problems with your specific application.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Pipe, fork, exec and red-hot pokers.
by hagus (Monk) on Apr 09, 2002 at 01:11 UTC | |
by rob_au (Abbot) on Apr 09, 2002 at 02:45 UTC |