… | |
… | |
81 | } |
81 | } |
82 | } |
82 | } |
83 | } |
83 | } |
84 | |
84 | |
85 | BEGIN { |
85 | BEGIN { |
86 | $VERSION = '1.0'; |
86 | $VERSION = '1.2'; |
87 | |
87 | |
88 | our @ISA = qw(Exporter); |
88 | our @ISA = qw(Exporter); |
89 | our @EXPORT = qw(spawn fd_inherit); |
89 | our @EXPORT = qw(spawn spawnp fd_inherit); |
90 | require Exporter; |
90 | require Exporter; |
91 | |
91 | |
92 | require XSLoader; |
92 | require XSLoader; |
93 | XSLoader::load (__PACKAGE__, $VERSION); |
93 | XSLoader::load (__PACKAGE__, $VERSION); |
94 | } |
94 | } |
… | |
… | |
100 | calling fork + execv, or execve. |
100 | calling fork + execv, or execve. |
101 | |
101 | |
102 | Returns the PID of the new process if successful. On any error, C<undef> |
102 | Returns the PID of the new process if successful. On any error, C<undef> |
103 | is currently returned. Failure to execution might or might not be reported |
103 | is currently returned. Failure to execution might or might not be reported |
104 | as C<undef>, or via a subprocess exit status of C<127>. |
104 | as C<undef>, or via a subprocess exit status of C<127>. |
|
|
105 | |
|
|
106 | =item $pid = spawnp $file, \@argv[, \@envp] |
|
|
107 | |
|
|
108 | Like C<spawn>, but searches C<$file> in C<$ENV{PATH}> like the shell would |
|
|
109 | do. |
105 | |
110 | |
106 | =item fd_inherit $fileno[, $on] |
111 | =item fd_inherit $fileno[, $on] |
107 | |
112 | |
108 | File descriptors can be inherited by the spawned processes or not. This is |
113 | File descriptors can be inherited by the spawned processes or not. This is |
109 | decided on a per file descriptor basis. This module does nothing to any |
114 | decided on a per file descriptor basis. This module does nothing to any |