summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_fifo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_fifo.cc')
-rw-r--r--winsup/cygwin/fhandler_fifo.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 742b70c10..694a51819 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -62,7 +62,8 @@ fhandler_fifo::close ()
fhandler_pipe::close ();
if (get_output_handle ())
CloseHandle (get_output_handle ());
- set_use (-1);
+ if (!hExeced)
+ set_use (-1);
return 0;
}