diff options
author | Christopher Faylor <me@cgf.cx> | 2008-08-19 02:56:28 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2008-08-19 02:56:28 +0000 |
commit | 46c6def37f8e2c1747e6715f6c811a62820bdc33 (patch) | |
tree | 2e694b43262345203425330d8ee47e09bfea4f1e /winsup/cygwin | |
parent | bba489539439916482e0b92b0bc593d55de51105 (diff) | |
download | cygnal-46c6def37f8e2c1747e6715f6c811a62820bdc33.tar.gz cygnal-46c6def37f8e2c1747e6715f6c811a62820bdc33.tar.bz2 cygnal-46c6def37f8e2c1747e6715f6c811a62820bdc33.zip |
* fhandler.cc (fhandler_base::wait_overlapped): Don't treat ERROR_BROKEN_PIPE
as a non-error. Do raise SIGPIPE when it is detected.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler.cc | 4 |
2 files changed, 8 insertions, 2 deletions
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 <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 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); |