From 30caac0569067a4cc59a77c99db1c52fd8001591 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 25 Aug 2008 17:27:06 +0000 Subject: add comments --- winsup/cygwin/fhandler.cc | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3