bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-g does not interrupt lisp code (emacs 21)


From: Gerd Moellmann
Subject: Re: C-g does not interrupt lisp code (emacs 21)
Date: 25 Oct 2001 10:44:10 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

Philippe Waroquiers <address@hidden> writes:

> > >   (while t) C-x C-e
> > 
> > And it works here with 21.1 as well.  Do other people see the same?
> 
> Some additional information. Tracing which system calls are done while
> emacs is blocked, here is the end of the trace :
> 
> ioctl(5, FIONREAD, 0x7f0aa6f0) ........................... = 0
> select(6, 0x7f07cae0, NULL, NULL, 0x7f07cbf0) ............ = 1
> gettimeofday(0x7f0a9f58, NULL) ........................... = 0
> ioctl(5, FIONREAD, 0x7f0aa730) ........................... = 0
> read(5, "02- \r3 bed41fd8\0\0\0' \a\0\01f".., 32) ........ = 32
> ioctl(5, FIONREAD, 0x7f0aa730) ........................... = 0
> gettimeofday(0x7f0a9f58, NULL) ........................... = 0
> gettimeofday(0x7f0a9fd8, NULL) ........................... = 0
> sigvec(SIGALRM, 0x7f07ca98, 0x7f07caa8) .................. = 0
> sigvec(SIGALRM, 0x7f07ca98, 0x7f07caa8) .................. = 0
> gettimeofday(0x7f07ca30, NULL) ........................... = 0
> setitimer(ITIMER_REAL, 0x7f07ca40, NULL) ................. = 0
> ioctl(5, FIONREAD, 0x7f0aa6f0) ........................... = 0
> write(5, "; \0\005\a\0\091\0\0\0\0\01c02v ".., 112) ...... = 112
> sigblock(0x2000) ......................................... = 8192

  (1)

> gettimeofday(0x40410064, NULL) ........................... = 0
> sigvec(SIGALRM, 0x7f07c458, 0x7f07c468) .................. = 0
> gettimeofday(0x7f07c3f0, NULL) ........................... = 0
> setitimer(ITIMER_REAL, 0x7f07c400, NULL) ................. = 0
> In user-mode ............................................. [running]
> 
> 
> after this, no way to have anything out of emacs 21.

Hmhmhm, the code is a maze in this area...

I think this has something to do with polling for input.  In both 20
and 21, a SIGALRM handler should be used for polling, i.e. looking for
input while Emacs is doing something else (that's the alarm(2)/sigvec
I guess in the trace of 20).  In 21, the SIGALRM, which should call
function poll_for_input, might have been blocked in (1), but I can't
see where that is in the code.  Is there a way to get more information
out of the trace?  Could you please add a printf to poll_for_input
to verify that it is really not running?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]