GNU bug report logs - #4970
23.1; Emacs Gtk running nuts

Previous Next

Package: emacs;

Reported by: Werner Fink <werner <at> suse.de>

Date: Thu, 19 Nov 2009 10:40:04 UTC

Severity: normal

Merged with 7951

Found in version 23.1

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 4970 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 4970 <at> debbugs.gnu.org, dann <at> ics.uci.edu
Subject: Re: bug#4970: 23.1; Emacs Gtk running nuts
Date: Fri, 20 Nov 2009 13:11:15 +0100
Eli Zaretskii skrev:
>> Date: Fri, 20 Nov 2009 11:37:01 +0100
>> From: Jan =?UTF-8?Q?Dj=C3=A4rv?= <jan.h.d <at> swipnet.se>
>> Cc: 4970 <at> emacsbugs.donarmstrong.com
>>
>> Dan Nicolaescu skrev:
>>> Jan Djärv <jan.h.d <at> swipnet.se> writes:
>>>
>>>   > What happens is that reading from the terminal fails and Emacs tries
>>>   > to remove that terminal, but in term.c:
>>>   > 
>>>   >   if (last_terminal)
>>>   >       error ("Attempt to delete the sole terminal device with live frames");
>>>   > 
>>>   > 
>>>   > which goes back to the command loop, tries to read agan, fails, and
>>>   > tries to delete the terminal again, and so on.
>>>   > 
>>>   > If you remove this check, Emacs exits.  But I suppose it is there for
>>>   > a reason, but I don't know what.  Anybody?
>>>
>>> It's there so that if you do:
>>> emacs -Q -nw
>>> C-x 5 0
>>> does not exit emacs.
>> Well, the check in term.c isn't preventing that.  It is the check in frame.c 
>> delete_frame that does that:
>>
>>    if (NILP (force) && !other_visible_frames (f))
>>      error ("Attempt to delete the sole visible or iconified frame");
> 
> What about delete-terminal?

Rhat check in term.c prevents delete-terminal from working when the FORCE 
argument is t.  Deleting an X11 terminal woth FORCE set to t makes a core dump...

> 
> And btw, are there any live frames when the test in term.c is made, in
> the recipe to reproduce the original bug?  If not, maybe it needs to
> check for live frames explicitly.

Yes there are. When read_socket_hook returns -2 and this is the last terminal, 
a SIGHUP is sent to ourselves (why not just call shutdown_emacs and exit?) and 
Fdelete_terminal is called.  So frames has not been removed yet.

	Jan D.



This bug report was last modified 13 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.