Run - Perl extension for to start programs in background


Run documentation  | view source Contained in the Run distribution.

Index


NAME

Top

Run - Perl extension for to start programs in background

SYNOPSIS

Top

  use Run;
  $pid = spawn 'long_running_task', 'arg1', 'arg2' or die "spawn: $!";
  do_something_else();
  waitpid($pid,0);

DESCRIPTION

Top

The subroutine spawn is equivalent to the builtin system (see system LIST in perlfunc) with the exceptions that the program is started in background, and the return the pid of the kid.

Returns 0 on failure, $! should contain the reason for the failure.

EXPORT

Top

Exports spawn by default.

AUTHOR

Top

Ilya Zakharevich <ilya@math.ohio-state.edu

TODO

Top

What to do with errs in or? Should they be cleared?

ENVIRONMENT

Top

PERL_RUN_DEBUG is used to set debugging flag.

NOTES

Top

open FH, ">&=FH1" creates a "naughty" copy of FH1. Closing FH will invalidate FH1.

SEE ALSO

Top

perl(1).


Run documentation  | view source Contained in the Run distribution.