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-19 06:56:28 +0400
committerChristopher Faylor <me@cgf.cx>2008-08-19 06:56:28 +0400
commit46c6def37f8e2c1747e6715f6c811a62820bdc33 (patch)
tree2e694b43262345203425330d8ee47e09bfea4f1e
parentbba489539439916482e0b92b0bc593d55de51105 (diff)
* fhandler.cc (fhandler_base::wait_overlapped): Don't treat ERROR_BROKEN_PIPE
as a non-error. Do raise SIGPIPE when it is detected.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler.cc4
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);