summaryrefslogtreecommitdiff
path: root/lib/IPC/Open3.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-06-05 07:50:12 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-06-05 07:50:12 +0000
commit64ab78e55a8eea6610eaec2b3b8740eead613094 (patch)
treef137662b5e67486f28cb5c4adbfbc0fd125f56fc /lib/IPC/Open3.pm
parent4b021f5f3b3636124de9776768d5a16528d92310 (diff)
downloadperl-64ab78e55a8eea6610eaec2b3b8740eead613094.tar.gz
Use POSIX::_exit instead of exit in IPC::Open when exiting after an
exec() failure, as suggested by Salvador Fandino after change #28347 p4raw-link: @28347 on //depot/perl: eee4b3e7bdad6a2c6ef0e7ee1f43200ab0fd25bb p4raw-id: //depot/perl@28350
Diffstat (limited to 'lib/IPC/Open3.pm')
-rw-r--r--lib/IPC/Open3.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm
index ba41733ab4..95313fce3d 100644
--- a/lib/IPC/Open3.pm
+++ b/lib/IPC/Open3.pm
@@ -262,7 +262,11 @@ sub _open3 {
}
return 0 if ($cmd[0] eq '-');
local($")=(" ");
- exec @cmd or do { carp "$Me: exec of @cmd failed"; exit 255; };
+ exec @cmd or do {
+ carp "$Me: exec of @cmd failed";
+ eval { require POSIX; POSIX::_exit(255); };
+ exit 255;
+ };
} elsif ($do_spawn) {
# All the bookkeeping of coincidence between handles is
# handled in spawn_with_handles.