- or download this
# i,o,e are std in/out/err
...
$hr->{'stdout'}= $o;
$hr->{'stdin'} = $i;
$hr->{'stderr'} = $e;
- or download this
# The reader is given the hash reference, the 'o'
# indicates this is the 'stdout' reader
$hr->{'o_thread'} = threads->create( \&reader_thread, $hr, 'o' );
- or download this
sub reader_thread {
my ($hr,$who) = @_;
...
}
}
}