On Fri, 10 Sep 2021 06:53:34 +0900 Takashi Yano wrote: > On Thu, 9 Sep 2021 21:42:46 +0900 > Takashi Yano wrote: > > On Thu, 9 Sep 2021 21:19:40 +0900 > > Takashi Yano wrote: > > > On Thu, 9 Sep 2021 17:05:49 +0900 > > > Takashi Yano wrote: > > > > On Thu, 9 Sep 2021 12:41:15 +0900 > > > > Takashi Yano wrote: > > > > > diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc > > > > > index 6709fb974..c40573783 100644 > > > > > --- a/winsup/cygwin/fhandler_fifo.cc > > > > > +++ b/winsup/cygwin/fhandler_fifo.cc > > > > > @@ -1047,6 +1047,12 @@ writer_shmem: > > > > > ResetEvent (writer_opening); > > > > > nwriters_unlock (); > > > > > success: > > > > > + if (!select_sem) > > > > > + { > > > > > + char name[MAX_PATH]; > > > > > + __small_sprintf(name, "semaphore-%W", get_pipe_name ()->Buffer); > > > > > + select_sem = CreateSemaphore (&sec_none, 0, INT32_MAX, name); > > > > > + } > > > > > return 1; > > > > > err_close_reader: > > > > > saved_errno = get_errno (); > > > > > > > > Should this be: > > > > > + select_sem = CreateSemaphore (sa_buf, 0, INT32_MAX, name); > > > > ? > > > > > > I revised the patch a bit. > > > > Sorry, I revised the patch again. > > The patch still has a mistake. Revised again. Partially commonize the codes regarding ReleaseSemaphore() in raw_read(). -- Takashi Yano