in reply to Returning status to parent from pipe
Be the shell and do the piping yourself.
use IPC::Open3 qw( open3 ); local *TO_CHLD; local *PIPE; local *FR_CHLD; my $com1_pid = open3(*TO_CHLD, *PIPE, '>STDERR', 'com1'); my $com2_pid = open3('<PIPE', '*FR_CHLD', '>STDERR', 'com2'); ... waitpid($com1_pid, 0); # $? is com1_pid's status waitpid($com2_pid, 0); # $? is com2_pid's status
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Returning status to parent from pipe
by morrin (Acolyte) on Aug 25, 2010 at 21:22 UTC |