* fhandler_tty.cc (fhandler_pty_slave::read): Use consistent way for testing
ReadFile return. * pipe.cc (fhandler_pipe::create_selectable): Open the write side of the pipe in message-mode to force writing as "chunks". Explain why.
This commit is contained in:
@@ -812,7 +812,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
|
||||
if (readlen)
|
||||
{
|
||||
termios_printf ("reading %d bytes (vtime %d)", readlen, vtime);
|
||||
if (ReadFile (get_handle (), buf, readlen, &n, NULL) == FALSE)
|
||||
if (!ReadFile (get_handle (), buf, readlen, &n, NULL))
|
||||
{
|
||||
termios_printf ("read failed, %E");
|
||||
raise (SIGHUP);
|
||||
|
Reference in New Issue
Block a user