[newlib-cygwin] Cygwin: FIFO: make read_ready an auto-reset event

Ken Brown kbrown@sourceware.org
Thu May 9 18:52:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0771fc703158b67ec14d82a3bb3ec1b4b72b094c

commit 0771fc703158b67ec14d82a3bb3ec1b4b72b094c
Author: Ken Brown <kbrown@cornell.edu>
Date:   Thu May 9 12:32:17 2019 -0400

    Cygwin: FIFO: make read_ready an auto-reset event
    
    There's no point in allowing a writer to attempt to open until we've
    created a pipe instance.

Diff:
---
 winsup/cygwin/fhandler_fifo.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 4bf157d..dab7df9 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -461,7 +461,7 @@ fhandler_fifo::open (int flags, mode_t)
 
   char npbuf[MAX_PATH];
   __small_sprintf (npbuf, "r-event.%08x.%016X", get_dev (), get_ino ());
-  if (!(read_ready = CreateEvent (sa_buf, true, false, npbuf)))
+  if (!(read_ready = CreateEvent (sa_buf, false, false, npbuf)))
     {
       debug_printf ("CreateEvent for %s failed, %E", npbuf);
       res = error_set_errno;



More information about the Cygwin-cvs mailing list