summaryrefslogtreecommitdiff
path: root/lib/IPC
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-15 04:07:18 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-15 04:07:18 +0000
commitf55ee38a033ce570145fdd38bb9f09acf59d37cd (patch)
treed09466217844d04a8289a2d2d15377ce38987426 /lib/IPC
parente6d5c5302bca4863c13ae11aa5ed04b35c9d89f5 (diff)
downloadperl-f55ee38a033ce570145fdd38bb9f09acf59d37cd.tar.gz
various win32 odds and ends
- added support for waitpid(), open2/open3, and a bugfix for kill() from Ronald Schmidt <RonaldWS@aol.com> - tweak testsuite mods of above - regenerate win32/config_H.?c - change kill() to win32_kill() and export it - coalesce common code in win32.c - add PerlProc_waitpid() and export win32_waitpid() result builds and passes on the three win32 compilers p4raw-id: //depot/perl@1134
Diffstat (limited to 'lib/IPC')
-rw-r--r--lib/IPC/Open3.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm
index 7b06a21fa4..f1415e3ad6 100644
--- a/lib/IPC/Open3.pm
+++ b/lib/IPC/Open3.pm
@@ -10,7 +10,7 @@ require Exporter;
use Carp;
use Symbol 'qualify';
-$VERSION = 1.0101;
+$VERSION = 1.0102;
@ISA = qw(Exporter);
@EXPORT = qw(open3);
@@ -66,6 +66,7 @@ C<cat -v> and continually read and write a line from it.
# &open3: Marc Horowitz <marc@mit.edu>
# derived mostly from &open2 by tom christiansen, <tchrist@convex.com>
# fixed for 5.001 by Ulrich Kunitz <kunitz@mai-koeln.com>
+# ported to Win32 by Ron Schmidt, Merrill Lynch almost ended my career
#
# $Id: open3.pl,v 1.1 1993/11/23 06:26:15 marc Exp $
#
@@ -119,7 +120,7 @@ sub xclose {
close $_[0] or croak "$Me: close($_[0]) failed: $!";
}
-my $do_spawn = $^O eq 'os2';
+my $do_spawn = $^O eq 'os2' || $^O eq 'MSWin32';
sub _open3 {
local $Me = shift;
@@ -267,10 +268,12 @@ sub spawn_with_handles {
$fd->{handle}->fdopen($saved{fileno $fd->{open_as}} || $fd->{open_as},
$fd->{mode});
}
- # Stderr may be redirected below, so we save the err text:
- foreach $fd (@$close_in_child) {
- fcntl($fd, Fcntl::F_SETFD(), 1) or push @errs, "fcntl $fd: $!"
- unless $saved{fileno $fd}; # Do not close what we redirect!
+ unless ($^O eq 'MSWin32') {
+ # Stderr may be redirected below, so we save the err text:
+ foreach $fd (@$close_in_child) {
+ fcntl($fd, Fcntl::F_SETFD(), 1) or push @errs, "fcntl $fd: $!"
+ unless $saved{fileno $fd}; # Do not close what we redirect!
+ }
}
unless (@errs) {