* fhandler.cc (fhandler_base::wait_overlapped): Don't treat ERROR_BROKEN_PIPE
as a non-error. Do raise SIGPIPE when it is detected.
This commit is contained in:
parent
bba4895394
commit
46c6def37f
|
@ -1,3 +1,9 @@
|
|||
2008-08-18 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* fhandler.cc (fhandler_base::wait_overlapped): Don't treat
|
||||
ERROR_BROKEN_PIPE as a non-error. Do raise SIGPIPE when it is
|
||||
detected.
|
||||
|
||||
2008-08-15 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mount.cc (mount_info::get_mounts_here): Don't subtract 2 from
|
||||
|
|
|
@ -1687,7 +1687,7 @@ fhandler_base::wait_overlapped (bool& res, bool writing, DWORD *bytes)
|
|||
DWORD err = GetLastError ();
|
||||
if (!res && err != ERROR_IO_PENDING)
|
||||
{
|
||||
if (err != ERROR_HANDLE_EOF && err != ERROR_BROKEN_PIPE)
|
||||
if (err != ERROR_HANDLE_EOF)
|
||||
goto err;
|
||||
res = 1;
|
||||
if (*bytes)
|
||||
|
@ -1738,7 +1738,7 @@ fhandler_base::wait_overlapped (bool& res, bool writing, DWORD *bytes)
|
|||
err:
|
||||
__seterrno_from_win_error (err);
|
||||
res = -1;
|
||||
if (err == ERROR_NO_DATA)
|
||||
if (err == ERROR_NO_DATA || err == ERROR_BROKEN_PIPE)
|
||||
raise (SIGPIPE);
|
||||
out:
|
||||
ResetEvent (get_overlapped ()->hEvent);
|
||||
|
|
Loading…
Reference in New Issue