summaryrefslogtreecommitdiff
path: root/ext/IPC-Open3/lib/IPC/Open3.pm
diff options
context:
space:
mode:
Diffstat (limited to 'ext/IPC-Open3/lib/IPC/Open3.pm')
-rw-r--r--ext/IPC-Open3/lib/IPC/Open3.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/IPC-Open3/lib/IPC/Open3.pm b/ext/IPC-Open3/lib/IPC/Open3.pm
index 7c7e9b532a..273f205480 100644
--- a/ext/IPC-Open3/lib/IPC/Open3.pm
+++ b/ext/IPC-Open3/lib/IPC/Open3.pm
@@ -9,7 +9,7 @@ require Exporter;
use Carp;
use Symbol qw(gensym qualify);
-$VERSION = '1.18';
+$VERSION = '1.19';
@ISA = qw(Exporter);
@EXPORT = qw(open3);
@@ -412,7 +412,11 @@ sub spawn_with_handles {
} else {
$pid = eval { system 1, @_ }; # 1 == P_NOWAIT
}
- push @errs, "IO::Pipe: Can't spawn-NOWAIT: $!" if !$pid || $pid < 0;
+ if($@) {
+ push @errs, "IO::Pipe: Can't spawn-NOWAIT: $@";
+ } elsif(!$pid || $pid < 0) {
+ push @errs, "IO::Pipe: Can't spawn-NOWAIT: $!";
+ }
}
# Do this in reverse, so that STDERR is restored first: