On Tue, 9 Nov 2021 09:11:28 -0500 Ken Brown wrote: > I'll have to reproduce the hang myself in order to test this (or maybe you > could > test it), but I now have a new guess: If the read call above keeps failing > with > EINTR, then we're in an infinite loop. This could happen because of the > following code in fhandler_pipe::raw_read: > > DWORD waitret = cygwait (read_mtx, timeout); > switch (waitret) > { > case WAIT_OBJECT_0: > break; > case WAIT_TIMEOUT: > set_errno (EAGAIN); > len = (size_t) -1; > return; > default: > set_errno (EINTR); > len = (size_t) -1; > return; > } > > Takashi, is EINTR really the appropriate errno in the default case? Isn't > cygwait supposed to handle signals?
I assume cygwait() returns WAIT_SIGNALED when signalled by SIGINT, SIGTERM, SIGTSTP, etc... In this case, EINTR should return I think. Is it wrong? -- Takashi Yano <takashi.y...@nifty.ne.jp> -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple