* 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.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user