summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_console.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r--winsup/cygwin/fhandler_console.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 01d90fe22..b6408e50e 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -595,7 +595,7 @@ fhandler_console::dup (fhandler_base *child)
{
fhandler_console *fhc = (fhandler_console *) child;
- if (!fhc->open (get_name (), get_flags (), 0))
+ if (!fhc->open (get_name (), get_flags () & ~O_NOCTTY, 0))
system_printf ("error opening console, %E");
fhc->default_color = default_color;