Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 758d6eaec..918b43493 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -454,7 +454,7 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t)
attach_tty (ttynum);
tc->set_ctty (ttynum, flags);
- set_flags (flags & ~O_TEXT, O_BINARY);
+ set_flags ((flags & ~O_TEXT) | O_BINARY);
/* Create synchronisation events */
char buf[40];
@@ -1006,7 +1006,7 @@ fhandler_pty_master::open (path_conv *, int flags, mode_t)
cygwin_shared->tty[ttynum]->common_init (this);
inuse = get_ttyp ()->create_inuse (TTY_MASTER_ALIVE);
- set_flags (flags & ~O_TEXT, O_BINARY);
+ set_flags ((flags & ~O_TEXT) | O_BINARY);
set_open_status ();
termios_printf ("opened pty master tty%d<%p>", ttynum, this);