From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; Emacs should survive a lost X connection Date: Sun, 10 Feb 2008 21:34:00 -0800 Message-ID: <200802110534.m1B5YB2t002214@sallyv1.ics.uci.edu> References: <20080205.155847.56398348.hanche@math.ntnu.no> <200802051957.m15Jv8r1019258@sallyv1.ics.uci.edu> <200802052349.m15NnxSu013983@sallyv1.ics.uci.edu> <200802062007.m16K7r78005498@sallyv1.ics.uci.edu> <200802080726.m187Q5gL002961@sallyv1.ics.uci.edu> <200802090504.m1954WTM028192@sallyv1.ics.uci.edu> <200802100803.m1A83Eq5026472@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202708257 23487 80.91.229.12 (11 Feb 2008 05:37:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2008 05:37:37 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, hanche@math.ntnu.no, rms@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 11 06:37:59 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JORMc-0000jv-6Z for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2008 06:37:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JORM8-0005BH-U2 for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2008 00:37:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JORLU-0004tL-04 for emacs-devel@gnu.org; Mon, 11 Feb 2008 00:36:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JORLT-0004sw-9D for emacs-devel@gnu.org; Mon, 11 Feb 2008 00:36:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JORLT-0004sr-4X for emacs-devel@gnu.org; Mon, 11 Feb 2008 00:36:47 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JORLS-0003yw-O2 for emacs-devel@gnu.org; Mon, 11 Feb 2008 00:36:47 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JORLS-0002kP-Cx for emacs-pretest-bug@gnu.org; Mon, 11 Feb 2008 00:36:46 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JORLP-0003yE-9T for emacs-pretest-bug@gnu.org; Mon, 11 Feb 2008 00:36:46 -0500 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1JORLO-0003xe-OP; Mon, 11 Feb 2008 00:36:43 -0500 X-ICS-MailScanner-Watermark: 1203312853.2618@v78Riffi4kZn0+iqWzLsAg Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m1B5YB2t002214; Sun, 10 Feb 2008 21:34:11 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sun, 10 Feb 2008 17:08:17 -0500") Original-Lines: 57 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.263, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FM_MULTI_ODD2 1.10, TW_DB 0.08) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88724 gmane.emacs.pretest.bugs:21020 Archived-At: Stefan Monnier writes: > > emacs -Q -nw -f server-start > > > emacsclient -c -d $DISPLAY& > > > xkill > > the emacsclient X11 frame > > > then C-x C-c in the emacs -nw frame will warn about clients still being > > connected. > > I installed a patch which refines Richard's fix and brings back the > correct "close the client connection" when you close a frame by sending > an X11 "delete" message. This doesn't solve the above problem because > in that case, the "delete_frame" execution is run at a time where Elisp > cannot be executed. Now emacs aborts after emacsclient is xkilled. Backtrace: #0 abort () at /tmp/emacs/src/emacs.c:429 #1 0x08147ecf in internal_condition_case_2 (bfun=0x81492e0 , nargs=2, args=0xbf9f2a18, handlers=137504169, hfun=0x80596d8 ) at /tmp/emacs/src/eval.c:1568 #2 0x080598ab in Fdelete_frame (frame=147758716, force=137704913) at /tmp/emacs/src/frame.c:1424 #3 0x080cb0bd in x_connection_closed (dpy=0x87db258, error_message=0xbf9f2ce0 "Connection lost to X server `:0.0'") at /tmp/emacs/src/xterm.c:8078 #4 0x080cb332 in x_io_error_quitter (display=0x87db258) at /tmp/emacs/src/xterm.c:8226 #5 0x00206fc2 in _XIOError () from /usr/lib/libX11.so.6 #6 0x0020dbb9 in ?? () from /usr/lib/libX11.so.6 #7 0x0020df9f in _XEventsQueued () from /usr/lib/libX11.so.6 #8 0x001f76d2 in XPending () from /usr/lib/libX11.so.6 #9 0x080ca571 in XTread_socket (terminal=0x8b9d2e0, expected=1, hold_quit=0xbf9f2fa0) at /tmp/emacs/src/xterm.c:7408 #10 0x080f36d7 in read_avail_input (expected=1) at /tmp/emacs/src/keyboard.c:7114 #11 0x080f39fe in handle_async_input () at /tmp/emacs/src/keyboard.c:7340 #12 0x080f3a31 in input_available_signal (signo=29) at /tmp/emacs/src/keyboard.c:7382 #13 #14 0x00110402 in __kernel_vsyscall () #15 0x007eb5bd in ___newselect_nocancel () from /lib/libc.so.6 #16 0x0817440d in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=137504121, wait_proc=0x0, just_wait_proc=0) at /tmp/emacs/src/process.c:4586 #17 0x08057299 in sit_for (timeout=240, reading=1, do_display=1) at /tmp/emacs/src/dispnew.c:6608 #18 0x080ef072 in read_char (commandflag=1, nmaps=2, maps=0xbf9f3830, prev_event=137504121, used_mouse_menu=0xbf9f3858, end_time=0x0) at /tmp/emacs/src/keyboard.c:2969 #19 0x080f6082 in read_key_sequence (keybuf=0xbf9f39a0, bufsize=30, prompt=137504121, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at /tmp/emacs/src/keyboard.c:9459 #20 0x080eccf8 in command_loop_1 () at /tmp/emacs/src/keyboard.c:1655 #21 0x08147d96 in internal_condition_case (bfun=0x80eca38 , handlers=137548353, hfun=0x80ec504 ) at /tmp/emacs/src/eval.c:1494 #22 0x080ec7d6 in command_loop_2 () at /tmp/emacs/src/keyboard.c:1370 #23 0x08147907 in internal_catch (tag=137543201, func=0x80ec7b8 , arg=137504121) at /tmp/emacs/src/eval.c:1230 #24 0x080ec764 in command_loop () at /tmp/emacs/src/keyboard.c:1349 #25 0x080ec188 in recursive_edit_1 () at /tmp/emacs/src/keyboard.c:958 #26 0x080ec2c8 in Frecursive_edit () at /tmp/emacs/src/keyboard.c:1020 #27 0x080eb15b in main (argc=5, argv=0xbf9f3f94) at /tmp/emacs/src/emacs.c:1786