From: Benjamin J. Tilly Date: Fri, 26 Mar 2004 21:02:19 +0000 (+0000) Subject: [perl #27986] IPC::Open3 fails in mod_perl (tie bug) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c67709088af01a4b494bf630471516b5c60e9408;p=p5sagit%2Fp5-mst-13.2.git [perl #27986] IPC::Open3 fails in mod_perl (tie bug) From: "Benjamin J. Tilly" (via RT) Message-ID: The forked child should make sure STDIN and STDOUT aren't tied before messing with them p4raw-id: //depot/perl@22609 --- diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm index fd47e8e..8636c33 100644 --- a/lib/IPC/Open3.pm +++ b/lib/IPC/Open3.pm @@ -197,6 +197,9 @@ sub _open3 { $kidpid = $do_spawn ? -1 : xfork; if ($kidpid == 0) { # Kid + # A tie in the parent should not be allowed to cause problems. + untie *STDIN; + untie *STDOUT; # If she wants to dup the kid's stderr onto her stdout I need to # save a copy of her stdout before I put something else there. if ($dad_rdr ne $dad_err && $dup_err