diff options
author | Egor Duda <deo@logos-m.ru> | 2001-04-27 06:27:28 +0000 |
---|---|---|
committer | Egor Duda <deo@logos-m.ru> | 2001-04-27 06:27:28 +0000 |
commit | a069f5602ee213504a1e8f42048d2fc39b3126c3 (patch) | |
tree | 940973f80ae6cc80fa1a5c2ab82e3736bcdf4268 /winsup/cygwin/tty.cc | |
parent | 22ae5a5be8eeef5722e003ccf07b133a59018b66 (diff) | |
download | newlib-a069f5602ee213504a1e8f42048d2fc39b3126c3.zip newlib-a069f5602ee213504a1e8f42048d2fc39b3126c3.tar.gz newlib-a069f5602ee213504a1e8f42048d2fc39b3126c3.tar.bz2 |
* tty.cc (tty::make_pipes): Set to_slave pipe mode to nonblocking.
* fhandler_tty.cc (fhandler_pty_master::accept_input): If pipe buffer
is full, give slave a chance to read data.
Diffstat (limited to 'winsup/cygwin/tty.cc')
-rw-r--r-- | winsup/cygwin/tty.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 768c21c..36ff39c 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -367,6 +367,10 @@ tty::make_pipes (fhandler_pty_master *ptym) ProtectHandle1 (from_slave, from_pty); termios_printf ("tty%d from_slave %p, to_slave %p", ntty, from_slave, to_slave); + + DWORD pipe_mode = PIPE_NOWAIT; + if (!SetNamedPipeHandleState (to_slave, &pipe_mode, NULL, NULL)) + termios_printf ("can't set to_slave to non-blocking mode"); ptym->set_io_handle (from_slave); ptym->set_output_handle (to_slave); return TRUE; |