NAME
Proc::Spawn - Run external programs
SYNOPSIS
use Proc::Spawn;
my ($pid, $in_fh, $out_fh, $err_fh) = spawn("...");
my ($pid, $in_fh, $out_fh, $err_fh) = spawn(["...", ...]);
my ($pid, $pty_fh) = spawn_pty("...");
my ($pid, $pty_fh) = spawn_pty(["...", ...]);
DESCRIPTION
Proc::Spawn runs external programs, like ls and telnet. The process id of the spawned programs and IO::Handle objects are returned.
The spawn function should be used for most purposes. It returns three IO::Handle objects for stdin, stdout, and stderr of the program being run. This is sufficient for running nearly all programs, and does not consume significant operating system resources.
The spawn_pty function should only be used when running a program that opens /dev/tty to communicate. Examples of such programs are telnet and passwd. This function returns a single IO::Handle object that must be used for all input and output for the program.
ERRORS
The module will die
on errors.
NOTES
This module is UNIX oriented. Functionality on other systems may vary.
AUTHOR
John Redford, John.Redford@fmr.com
SEE ALSO
IO::Handle