Hello, On Mon, 29 Aug 2005, Christopher Faylor wrote:
> >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. It took me a while to understand what's going on. Cygwin changes over the time and since I don't follow the changes closely I have to refresh my memory each time I try debug something which is not trivial. And then at the end everything seems so obvious once you've seen the whole picture :) > 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. I could reproduce the hang with your testcase but I didn't try to trace it still. I'll try to debug if noone beats me. -- 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/