in reply to Pipe, STDERR, STDOUT, and friends
The question is, however, how to use open3 in this case. You could supply different handles for the child's STDOUT and STDERR, but then it becomes very hard to communicate with the child. (You'd need to use IO::Select to avoid deadlocks.)
If you don't mind combining the child's STDOUT and STDERR into one stream, that's a much simpler option.
$pid = open3( my $to_child, # Autovivified when false. my $fr_child, # Autovivified when false. undef, # Same as $fr_child when false. $somecommand, @args ); ... waitpid($pid, 0);
|
|---|