projects
/
perl.git
/ commitdiff
free
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
e58f7f2
)
IPC::Open3::open3(..., '-') broken
author
Salvador Fandino <sfandino@yahoo.com>
Wed, 27 Jul 2011 16:20:29 +0000 (09:20 -0700)
committer
Dominic Hargreaves <dom@earth.li>
Fri, 7 Sep 2012 22:18:21 +0000 (23:18 +0100)
IPC::Open3::open3($in, $out, $err, '-') is broken in 5.14.1
Because the old "return 0" used to return to user code now is wrapped inside and eval block.
This patch solves the problem.
ext/IPC-Open3/lib/IPC/Open3.pm
patch
|
blob
|
blame
|
history
diff --git
a/ext/IPC-Open3/lib/IPC/Open3.pm
b/ext/IPC-Open3/lib/IPC/Open3.pm
index
7015d27
..
e238528
100644
(file)
--- a/
ext/IPC-Open3/lib/IPC/Open3.pm
+++ b/
ext/IPC-Open3/lib/IPC/Open3.pm
@@
-284,11
+284,14
@@
sub _open3 {
} else {
xopen \*STDERR, ">&STDOUT" if fileno(STDERR) != fileno(STDOUT);
}
- return 0 if ($cmd[0] eq '-');
+ return 1 if ($cmd[0] eq '-');
exec @cmd or do {
local($")=(" ");
croak "$Me: exec of @cmd failed";
};
+ } and do {
+ close $stat_w;
+ return 0;
};
my $bang = 0+$!;