[comp.windows.x] xterm exiting on SIGPIPE.

christos@batcomputer.tn.cornell.edu (Christos S. Zoulas) (03/14/90)

Hi,

Occasionally when exiting X-windows, some of the xterms seem to die
before they have a chance to clear utmp, and chown/chmod the pty/tty
pairs they are using. Apparently suntools does not like this situation
very much, i.e. not owned by root and with mode 640. 
[Actually any cmdtool finding such a pty will get stuck consuming lots
 of cpu cycles]

This happens when the X-server dies before the xterm does. Then, if
the xterm tries to write to the output file descriptor, a SIGPIPE is
generated and xterm exits before it has a chance to clean up.

The solution is to add a line signal(SIGPIPE, SIG_IGN) in main.c.
This fixes the problem on our sun3's running SUNOS4.0.1 and on our
rt's running the December release of AOS4.3

christos


-- 
  _____________________________________________________________________
 |   ARPA: christos@ee.cornell.edu                                     |
 |   UUCP: {cmc12,shasta,uw-beaver,rochester}!cornell!tesla!christos   |
  ---------------------------------------------------------------------