From xemacs-m  Wed Sep 10 03:44:45 1997
Received: from frege.math.ethz.ch (root@frege-d-math-north-g-west.math.ethz.ch [129.132.145.3])
	by xemacs.org (8.8.5/8.8.5) with SMTP id DAA16488
	for <xemacs-beta@xemacs.org>; Wed, 10 Sep 1997 03:44:44 -0500 (CDT)
Received: from midget (vroonhof@midget [129.132.145.4]) by frege.math.ethz.ch (8.6.12/Main-STAT-mailer) with ESMTP id KAA09803; Wed, 10 Sep 1997 10:44:39 +0200
Received: (vroonhof@localhost) by midget (SMI-8.6/D-MATH-client) id KAA18455; Wed, 10 Sep 1997 10:44:39 +0200
To: engelen@lucent.com
Cc: fjo@nada.kth.se (Fredrik =?ISO-8859-1?Q?J=F6nsson?=),
        xemacs-beta@xemacs.org
Subject: Re: xemacs not dying on logout
References: <b9u4t7wuvlm.fsf@fjo.nada.kth.se> <5v5f2u$h9u@ssbunews.ih.lucent.com>
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
From: Jan Vroonhof <vroonhof@math.ethz.ch>
Date: 10 Sep 1997 10:44:38 +0200
In-Reply-To: cvengel@hzsbg01.lucent.com's message of 10 Sep 1997 06:35:10 GMT
Message-ID: <by202x1rt4.fsf@midget.math.ethz.ch>
Lines: 51
X-Mailer: Gnus v5.4.55/XEmacs 19.15

cvengel@hzsbg01.lucent.com (Chris van Engelen) writes:

> I have had exactly the same problem with XEmacs under OpenWindows, CDE, fvwm,
> fvwm2, and fvwm95, from the very first version which I started using (19.12),
> up until the version of XEmacs I'm currently using (19.14).

Note that we also saw these problems in these versions but we do NOT
see them in 19.15. Note also that Fredrik said he already tested some
patches (probaly equivalent to yours) that didn't help.

> device-x.c. Attached to this mail is my patch to this function for XEmacs
> 19.14, but I'm sure it is still valid for XEmacs 19.15 and 20.x.

Your patch is not in XEmacs 19.15. However it is a cannot hapen
situation. Deleting the device SHOULD kill xemacs if it the last one.

> int
> x_IO_error_handler (Display *disp)
> {

Fredrik can you breakpoint on 'x_IO_error_handler' and
io_error_delete_device with gdb to see whether they actually get
called on exit.

>   /* CvE, July 16, 1996, XEmacs 19.14 */
>   /* Test for broken pipe error, which indicates X-server has gone down */
>   if ( errno == EPIPE )
>   {
>       /* Most probably X-server has gone down: Avoid infinite loop by just exciting */
>       stderr_out( "\n\nXEmacs exiting on broken pipe (errno %d, %s)\n", errno, strerror( errno ) );
>       exit( 1 );

One reason this is NOT the right way to fix it is that if you have
several devices open then you do not want kill xemacs if one of them
goes away.

One of the difficulties of solving these kind of problem is that they
only occur on some systems and then only sometimes. The "good thing"
now is that Fredrik seems to have a sure-fire way of reproducing it.

The infamous 19.13-19.14 frame freezing problem got fixed because I
could reproduce it and was sufficiently annoyed to become a beta
tester and fix it myself.


Jan

P.S. Frederik I was trying to come up with a static binary for you but
onfurtunately I do not seem to have all the support libraries in
static form. I'll try again if we cannot resolve this.

