From xemacs-m  Sat Sep 13 01:46:57 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id BAA21895
	for <xemacs-beta@xemacs.org>; Sat, 13 Sep 1997 01:46:57 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.7/8.8.7) id XAA26671;
	Fri, 12 Sep 1997 23:50:01 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: xemacs not dying on logout
References: <b9u4t7wuvlm.fsf@fjo.nada.kth.se> <5v5f2u$h9u@ssbunews.ih.lucent.com> <b9usovdk0k2.fsf@fjo.nada.kth.se> <byk9gp1npd.fsf@midget.math.ethz.ch> <m2n2llw26j.fsf@altair.xemacs.org> <by3encmfxb.fsf@midget.math.ethz.ch>
X-Face: `'%\i;ySOu]g?NlziJSk_$&@]KP`}~PEQPjZ5;nxSaDW_o$4+4%Ab]%Ifw3ZR;7TIT3,O,'
 @2{L;]ox6kc;$_5kU'n**9vFg-]eV~GbxSVCx|(s%uR[],*:^WKmC`B}(;|k9/m]gwt?&`t;^rfCJg
 khHH>pP1W\)xM0U@!FNDD72{3fDP$PkBhx^7Z?-WxH6DbFN:QOnT`llzW}VGdYv;n9lzljQvKTIBhQ
 YuV
X-Attribution: sb
From: SL Baur <steve@xemacs.org>
Date: 12 Sep 1997 23:41:56 -0700
In-Reply-To: Jan Vroonhof's message of "11 Sep 1997 10:08:00 +0200"
Message-ID: <m2k9glpvez.fsf@altair.xemacs.org>
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Lines: 59
X-Mailer: Gnus v5.4.65/XEmacs 20.3(beta20) - "Tirana"

O.K.  I've put a patch along the lines suggested here in beta20.  Can
someone prone to this problem please test it out before it goes into
19.16?  I've had lots of recent crashes of the X server due
(apparently) to Linux libc6 bugs and XEmacs definitely dies for me
when the X server goes away.

Index: src/emacs.c
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/src/emacs.c,v
retrieving revision 1.22
diff -u -r1.22 emacs.c
--- emacs.c	1997/09/03 03:39:31	1.22
+++ emacs.c	1997/09/13 06:41:19
@@ -191,7 +191,7 @@
   /* If fatal error occurs in code below, avoid infinite recursion.  */
   if (! fatal_error_in_progress)
     {
-      fatal_error_in_progress = 1;
+      fatal_error_in_progress = dont_check_for_quit = 1;
       shut_down_emacs (sig, Qnil);
       stderr_out("\nLisp backtrace follows:\n\n");
       Fbacktrace(Qexternal_debugging_output, Qt);



Jan Vroonhof <vroonhof@math.ethz.ch> writes:

> SL Baur <steve@xemacs.org> writes:
>> Presumably this is from a thread in comp.emacs.xemacs.

> Partly, yes. Note that this bug apperently also occurs in 19.15, so it
> seems like a patch is needed for 19.16 not only in the beta.

>> >> #13 <signal handler called>
>> >> #12 0x63c64 in fatal_error_signal (sig=13) at emacs.c:195
>> 
>> > So XEmacs DOES get the signal but in the "wrong" signal handler (the
>> > XIO version is much cleaner).

> Note that this should fixed if we want to get red of the SIGPIPE kills
> XEmacs problem.

>> > So somehow we should prevent XEmacs from calling check_quit () when we
>> > ARE quitting.
>> 
>> Something like that, yes.

> May be it is sufficient to put

> dont_check_for_quit=1;

> at the top of 'fatal_error_signal'. To me it seems like it cannot hurt
> much.

> But really shouldn't a program get another SIGPIPE when it tries to
> talk to the X server again?

> Jan

