From 31d2bedc585420092eb53895c5f5646651f13215 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 23 Oct 2011 19:01:47 +0000 Subject: * 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. --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler_tty.cc') diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f3a9a5f34..b019db046 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -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); -- cgit v1.2.3