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:
authorChristopher Faylor <me@cgf.cx>2008-08-20 06:25:06 +0400
committerChristopher Faylor <me@cgf.cx>2008-08-20 06:25:06 +0400
commitfbf39a58cbbd92f3f185bad685c67099cc1ec805 (patch)
tree52d78923e8a61c058d6ecfba274985cd8ff549e8 /winsup/cygwin/fhandler_fifo.cc
parentec8a7e416f570407fe5360959272418a2b4c79f8 (diff)
* fhandler.cc (fhandler_base::wait_overlapped): Always assume that bytes will
be non-NULL. Distinguish input result from result derived from WFMO and GetOverlappedResult or res can never be -1. Only raise SIGPIPE when writing. * fhandler.h (fhandler_base::wait_overlapped): Pass first argument by value. * fhandler_fifo.cc (fhandler_fifo::wait): Pass in dummy byte count to wait_overlapped. * pipe.cc (DEFAULT_PIPEBUFSIZE): Define to 65536 explicitly.
Diffstat (limited to 'winsup/cygwin/fhandler_fifo.cc')
-rw-r--r--winsup/cygwin/fhandler_fifo.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 0faaec95e..a97d949ee 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -132,9 +132,10 @@ fhandler_fifo::wait (bool iswrite)
{
case fifo_wait_for_client:
bool res = ConnectNamedPipe (get_handle (), get_overlapped ());
+ DWORD dummy_bytes;
if (res || GetLastError () == ERROR_PIPE_CONNECTED)
return true;
- return wait_overlapped (res, iswrite, NULL);
+ return wait_overlapped (res, iswrite, &dummy_bytes);
default:
break;
}