summaryrefslogtreecommitdiff
path: root/lib/IPC
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-07-11 18:43:26 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-07-11 18:43:26 +0000
commit036b4402dc24284de44ae733b52896d6fd4fbb77 (patch)
treed5e9e3da35cb3d3e73042376fa1e177e1605d2ae /lib/IPC
parent5e8d048a952c2fb1d246a3acf32bd1f15a6358fa (diff)
downloadperl-036b4402dc24284de44ae733b52896d6fd4fbb77.tar.gz
integrate cfgperl changes#6252..6260 into mainline
p4raw-link: @6260 on //depot/cfgperl: fc865a0069737312ca5ef9762fe8a9be7aa37747 p4raw-link: @6252 on //depot/cfgperl: 0e4dedf1581344244dfa297db1d00c01c5f821aa p4raw-id: //depot/perl@6362 p4raw-integrated: from //depot/cfgperl@6361 'copy in' t/pragma/constant.t (@5717..) t/op/pack.t t/pragma/warn/op (@5996..) pp_proto.h (@6243..) t/op/my_stash.t (@6250..) lib/IPC/Open3.pm (@6253..) 'ignore' t/pragma/warn/regcomp (@6241..) lib/Exporter.pm (@6251..) p4raw-integrated: from //depot/cfgperl@6260 'copy in' pp.c (@6217..) pod/perlfunc.pod (@6248..) p4raw-integrated: from //depot/cfgperl@6259 'copy in' MANIFEST (@6250..) p4raw-integrated: from //depot/cfgperl@6257 'copy in' op.c (@6228..) 'merge in' sv.c (@6244..) p4raw-integrated: from //depot/cfgperl@6256 'copy in' doop.c (@6254..) p4raw-integrated: from //depot/cfgperl@6254 'copy in' t/op/tr.t (@6192..) 'ignore' embedvar.h objXSUB.h (@6243..) 'merge in' embed.h (@6243..) embed.pl proto.h (@6250..)
Diffstat (limited to 'lib/IPC')
-rw-r--r--lib/IPC/Open3.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm
index 6d91c81381..5c9c69ad02 100644
--- a/lib/IPC/Open3.pm
+++ b/lib/IPC/Open3.pm
@@ -44,6 +44,9 @@ by an autogenerated filehandle. If so, you must pass a valid lvalue
in the parameter slot so it can be overwritten in the caller, or
an exception will be raised.
+The filehandles may also be integers, in which case they are understood
+as file descriptors.
+
open3() returns the process ID of the child process. It doesn't return on
failure: it just raises an exception matching C</^open3:/>. However,
C<exec> failures in the child are not detected. You'll have to
@@ -137,14 +140,13 @@ sub xclose {
close $_[0] or croak "$Me: close($_[0]) failed: $!";
}
-sub xfileno {
- my ($fh) = @_;
- return $1 if $fh =~ /^=?(\d+)$/; # deal with $fh just being an fd
- return fileno $fh;
+sub fh_is_fd {
+ return $_[0] =~ /\A=?(\d+)\z/;
}
-sub fh_is_fd {
- return $_[0] =~ /^=?\d+$/;
+sub xfileno {
+ return $1 if $_[0] =~ /\A=?(\d+)\z/; # deal with fh just being an fd
+ return fileno $_[0];
}
my $do_spawn = $^O eq 'os2' || $^O eq 'MSWin32';