On Fri, 4 Apr 2025 14:13:57 +0200 (CEST) Johannes Schindelin wrote: > On Fri, 4 Apr 2025, Takashi Yano wrote: > > On Fri, 04 Apr 2025 07:27:09 +0200 Johannes Schindelin wrote: > > > > > Is Jeremy's guess "if raw_write doesn't need to wait (ie, there's room > > > in the pipe for the write) it doesn't hit the signal stuff" correct? > > > If so, it would be good to add that part to the commit message because > > > the commit would otherwise still be incomplete. > > > > That's not correct. Indeed, raw_write() waits for room in the pipe, > > however, it does not matter in this case. The probelm occurs at > > cygwait() which waits for pipe mutex as already mentioned in the commit > > message. > > So what is the explanation, then, that this hung only occasionally and not > all the time?
As far as I investigated, the event handle signal_arrived was never initialized all the time. Therefore, the its value is just copied from the parent. The event signal_arrived is not inheritable, so, the handle value is basically not a valid one. However, the handle value of win32 is a small value such as 0x1ac, it can easily be the same value with other existing handle. I observed two cases, one was the value of signal_arrived was a valid handle value but was not the event handle, the other was the value was a valid event handle (but not initialize as signal_arrived). I'm not quite sure why, but most of the cases were one of the above. Then sometimes its value is really invalid. -- Takashi Yano <takashi.y...@nifty.ne.jp>