Help for this page

Select Code to Download


  1. or download this
        # i,o,e are std in/out/err
    
    ...
        $hr->{'stdout'}= $o;
        $hr->{'stdin'} = $i;
        $hr->{'stderr'} = $e;
    
  2. 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' );
    
  3. or download this
    sub reader_thread {
        my ($hr,$who) = @_;
    ...
        }
        }
    }