On Mon, Aug 29, 2005 at 01:45:43PM +0300, Pavel Tsekov wrote: >Hello, > >> in cancelable_wait(). The signal handler returns to the wrong place (?) and >> ends up in WaitForMultipleObjects() instead after the sigsuspend() call in >> zsh. I'll see what I can find out. If I find out something which makes more >> sense that what I currently know I'll post. > >I have new information on this matter. This time I think I found the real >reason for the hang. > >The sigsuspend() function does one simple thing - it calls handle_sigsuspend(). >handle_sigsuspend() sets the signal mask to the one passed to sigsuspend() >and then calls cancelable_wait() to wait for a signal which is not in the >mask just set. As part of its setup cancelable_wait() ends up calling >_cygtls::setup_fault() (via pthread::is_good_object()). _cygtls::setup_fault() >ends up calling the assembly routine stabilize_sig_stack() (via setjmp). >stabilize_sig_stack() will call a signal handler if there is a signal to >be processed. This check is used to determine if there is signal to process: > >2: cmpl $0,-1040(%ebx) > >The check is quering the `sig' member of the _cygtls structure. This >member is filled by the interrupt_setup() routine.
Nice analysis of the problem. This seems to be the same problem that Volker Quetschke reported here: http://sources.redhat.com/ml/cygwin/2005-08/msg01287.html AFAIK, I fixed that yesterday: http://sources.redhat.com/ml/cygwin/2005-08/msg01287.html FWIW, this doesn't fix the hang that *I* see, but I wouldn't have expected it to because that code didn't exist in 1.5.18 and zsh still hangs in 1.5.18. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/