diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f8c4be131..ae21fe5d6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2008-08-18 Christopher Faylor + + * 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 * mount.cc (mount_info::get_mounts_here): Don't subtract 2 from diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 7827d2d21..3fdddd549 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -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);