Help for this page

Select Code to Download


  1. or download this
    my $ch = Proc::Background->new(@command);
    if (defined $ch->pid()) {
    ...
      # failed to execute
      exit 127;
    }
    
  2. or download this
    $ perl /tmp/scratch.pl true
    [child] Executing true
    ...
    [parent] Terminating with exit code 0.
      <after 5 seconds>
    [child] Exiting with exit code 1.
    
  3. or download this
    #!/usr/bin/env perl
    
    ...
    
        return $exitcode;
    }
    
  4. or download this
    #!/usr/bin/env perl
    
    ...
        say("[child] Exiting with exit code $exitcode.");
        exit $exitcode;
    }