From ff3ef36d88dc4b3e632e30df7e077a573b77b3f7 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 22 Mar 2003 18:30:58 +0000 Subject: * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't exist. --- winsup/cygwin/pipe.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/pipe.cc') diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index f131fd43f..a84aeee60 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -133,9 +133,12 @@ fhandler_pipe::fixup_after_fork (HANDLE parent) int fhandler_pipe::dup (fhandler_base *child) { - int res = fhandler_base::dup (child); - if (res) - return res; + if (get_handle ()) + { + int res = fhandler_base::dup (child); + if (res) + return res; + } fhandler_pipe *ftp = (fhandler_pipe *) child; -- cgit v1.2.3