aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/fhandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index e61b90e..21f4fb3 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -916,7 +916,9 @@ fhandler_base::dup (fhandler_base *child)
debug_printf ("in fhandler_base dup");
HANDLE nh;
- if (!DuplicateHandle (hMainProc, get_handle(), hMainProc, &nh, 0, TRUE,
+ if (get_nohandle ())
+ nh = NULL;
+ else if (!DuplicateHandle (hMainProc, get_handle(), hMainProc, &nh, 0, TRUE,
DUPLICATE_SAME_ACCESS))
{
system_printf ("dup(%s) failed, handle %x, %E",
@@ -1151,7 +1153,7 @@ fhandler_base::fixup_after_fork (HANDLE parent)
fork_fixup (parent, io_handle, "io_handle");
}
-int
+bool
fhandler_base::is_nonblocking ()
{
return (openflags & O_NONBLOCK_MASK) != 0;