New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPC::Open3::open3(..., '-') broken #11527
Comments
From @salvaCreated by @salvaIPC::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. The following patch solves the problem: ==================================================================== Inline Patch--- Open3.pm~ 2011-07-27 10:09:39.072915811 +0200
+++ Open3.pm 2011-07-27 12:30:08.066949005 +0200
@@ -284,12 +284,15 @@
} 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+$!;
my $err = $@;
==================================================================== Perl Info
|
From @salvapatch attached, as the version I included inline seems mangled |
From @salvaopen3.patch--- Open3.pm~ 2011-07-27 10:09:39.072915811 +0200
+++ Open3.pm 2011-07-27 12:30:08.066949005 +0200
@@ -284,12 +284,15 @@
} 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+$!;
my $err = $@;
|
From [Unknown Contact. See original ticket]patch attached, as the version I included inline seems mangled |
@salva - Status changed from 'new' to 'open' |
From @cpansproutOn Wed Jul 27 03:48:31 2011, salva wrote:
Thank you for the patch. I can confirm it works, and have applied it as Is there any chance you could write a test for that? (My last few |
@cpansprout - Status changed from 'open' to 'resolved' |
From @zmanda-pusher1On Wed Jul 27 09:22:21 2011, sprout wrote:
Can you commit the patch to the maint-5.14 branch? |
Migrated from rt.perl.org#95748 (status was 'resolved')
Searchable as RT95748$
The text was updated successfully, but these errors were encountered: