This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "emacs -nw" hangs in a terminal


On May 25 15:03, Corinna Vinschen wrote:
> On May 25 08:45, Ken Brown wrote:
> > On 5/25/2012 6:03 AM, Corinna Vinschen wrote:
> > >And then again, do we know if 24.x works on older Cygwin release or
> > >snapshots?  If it's a Cygwin problem, it might help to nail it down.
> > 
> > It works on the 20120111 snapshot but fails on the 20120122
> > snapshot. Thanks for suggesting this.  It should have been the first
> > thing I checked.
> 
> Cool!  That only leaves three checkins to be the culprit.  I'm not
> sure I can get to it over the weekend (and Monday is a holiday here),
> but I'll certainly try to track it down next week.

Ok, I had a look already and I see where the problem is, but that
doesn't mean I understand it yet.

C-g results in calling an emacs signal handler from select.  Up to the
change from 20120122 in select.cc, all select threads have been stopped
before the signal handler is called.  This works fine.

After the change from 20120122, the signal handler is called first, and
only afterwards the select threads are cleaned up.  This results in
starting another pipesel thread and the subsequent crash.

I applied a patch which calls the signal handler after cleanup.  The
downside is that the signal handler is only called if select is called
from the main thread.  A better patch would perhaps be to stop all
threads, call the signal handler, and restart the threads afterwards,
but this is more tricky.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]