Help for this page

Select Code to Download


  1. or download this
    use run_limited;          # I need a better name
    my $runner = Runner->new; # got to get the names straight 
    $runner->load('true');
    $runner->load('sleep 2');
    $runner->run("$timeout");
    
  2. or download this
    $VAR1 = \bless( {
                  'sleep 999' => {
    ...
                                   'stdout' => bless( [], 'Thread::Queue' 
    +)
                                   }
                     }, 'Runner' );
    
  3. or download this
    $stdout=$runner->stdout($command);
    $stderr=$runner->stderr($command);
    ... etc ...
    
  4. or download this
    #!/usr/bin/perl
    #
    ...
    # the following right bracket closes the package
    }
    1;
    
  5. or download this
    #!/usr/bin/perl
    use strict;
    ...
    is ($runner->run("$timeout"), 1, "Check correct number had to be kille
    +d");
    
    print Dumper(\$runner);
    
  6. or download this
    our $sigpipe=0;
    $SIG{PIPE}=sub{$sigpipe++};