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-25 21:27:06 +0400
committerChristopher Faylor <me@cgf.cx>2008-08-25 21:27:06 +0400
commit30caac0569067a4cc59a77c99db1c52fd8001591 (patch)
treeb92ebff1a47736fec7a95286ed7d6481d73c6d4f
parent7e1645ce4dae960a11127e8e56b1e991d0872ab3 (diff)
add comments
-rw-r--r--winsup/cygwin/fhandler.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 49af86f9e..a6eec3f4a 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1740,6 +1740,10 @@ err:
__seterrno_from_win_error (err);
res = -1;
out:
+ /* Make sure the event is unsignalled (this is a potential race in a multi-threaded
+ app. Sigh.). Must do this after WFMO and GetOverlappedResult or suffer
+ occasional sporadic problems:
+ http://cygwin.com/ml/cygwin/2008-08/msg00511.html */
ResetEvent (get_overlapped ()->hEvent);
if (writing && (err == ERROR_NO_DATA || err == ERROR_BROKEN_PIPE))
raise (SIGPIPE);