* 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.
This commit is contained in:
Egor Duda
2001-04-27 06:27:28 +00:00
parent 22ae5a5be8
commit a069f5602e
3 changed files with 36 additions and 4 deletions

View File

@@ -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;