From: Rafael Garcia-Suarez Date: Mon, 5 Jun 2006 07:50:12 +0000 (+0000) Subject: Use POSIX::_exit instead of exit in IPC::Open when exiting after an X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=64ab78e55a8eea6610eaec2b3b8740eead613094;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm index ba41733..95313fc 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.