Article View: comp.windows.x
Article #38383Emacs-19.19 & NCD's Xremote
From: Chris Jepeway
Date: Mon, 01 Nov 1993 19:51
Date: Mon, 01 Nov 1993 19:51
39 lines
2261 bytes
2261 bytes
This is a repost of an article previously submitted to gnu.emacs.bug.
When running Emacs-19.19 connected to an NCD Xterminal running over a
9600 baud modem using NCD's Xremote software, emacs will eventually
shut itself down. After tracing the code on a Sparc running
SunOS-4.1.3, the problem has been narrowed to the following snippet of
code from xterm.c, starting at line 3349 (I've marked 3 lines of
interest with leading >'s):
#ifdef HAVE_SELECT
if (expected && ! event_found)
{
/* AOJ 880406: if select returns true but XPending doesn't, it means that
there is an EOF condition; in other words, that X has died.
Act as if there had been a hangup. */
int fd = ConnectionNumber (x_current_display);
SELECT_TYPE mask;
EMACS_TIME timeout;
FD_SET(fd, &mask);
EMACS_SET_SECS_USECS (timeout, 0, 0);
> if (0 != select (fd + 1, &mask, (long *) 0, (long *) 0, &timeout)
> && !XStuffPending ())
> kill (getpid (), SIGHUP);
}
#endif /* ! defined (HAVE_SELECT) */
Can anyone confirm whether the comment AOJ made in 1988 is still correct?
That is, if select() returns non-zero, and XStuffPending() returns zero,
then it's time to shut emacs down? Is there perhaps a race condition
that only manifests itself when X runs over a long-delay line? Oh, and
for what it's worth, I tried adding
XFlush (x_current_display);
just before the call to select(), as was suggested recently on comp.windows.x.
It didn't fix the problem.
Thanks for any help,
Chris <jepeway.cs.utk.edu>
Technical Details
Message-ID:
<2b3pbbINNimg@CS.UTK.EDU>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!emory!cs.utk.edu!usenetShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103734,6e7a0cb882ac123a,start X-Google-Attributes: gid103734,public X-Google-Thread: 103b8b,6e7a0cb882ac123a,start X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1993-11-01 11:58:17 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!emory!cs.utk.edu!usenet From: jepeway@cs.utk.edu (Chris Jepeway) Newsgroups: comp.windows.x,gnu.emacs.help Subject: Emacs-19.19 & NCD's Xremote Date: 1 Nov 1993 19:51:07 GMT Organization: Computer Science Dept, University of Tennessee, Knoxville Lines: 40 Distribution: world Message-ID: <2b3pbbINNimg@CS.UTK.EDU> NNTP-Posting-Host: duncan.cs.utk.edu