[comp.windows.x] Shoudl X11R3 xterm really ignore SIGHUP's?

prc@erbe.se (Robert Claeson) (11/04/89)

What is the reason behind having xterm ignore SIGHUP's? Makes a lot of
xterm's keep floating around in the system when I turn my X terminal
off. Would it be safe to remove all signal(SIGHUP, SIG_IGN); calls
in xterm?

-- 
          Robert Claeson      E-mail: rclaeson@erbe.se
	  ERBE DATA AB

jim@EXPO.LCS.MIT.EDU (Jim Fulton) (11/06/89)

    What is the reason behind having xterm ignore SIGHUP's?  Makes a lot of
    xterm's keep floating around in the system when I turn my X terminal
    off. Would it be safe to remove all signal(SIGHUP, SIG_IGN); calls
    in xterm?

The SIGHUP handling to make sure that xterm and its subprocess end up in the
right group.  Removing them won't do you any good with your X terminal unless
you are running a session manager that periodically pings the server to see if
it is alive and then explicitly sends its own HUP signals.  

If you are using TCP to connect to the terminal, your host has no way of
knowing that the terminal went away unless your program or the kernel itself
tries to send some data (and your kernel keeps some sort of timeout for
deciding that a connection is dead as opposed to very slow).  Until XDMCP
is standardized and your vendor has implemented it, you probably shouldn't
turn your terminal off without shutting down your windows.

brooks@maddog.llnl.gov (Eugene Brooks) (11/06/89)

In article <8911052329.AA29134@kanga.lcs.mit.edu> jim@EXPO.LCS.MIT.EDU (Jim Fulton) writes:
>The SIGHUP handling to make sure that xterm and its subprocess end up in the
>right group.  Removing them won't do you any good with your X terminal unless
>you are running a session manager that periodically pings the server to see if
>it is alive and then explicitly sends its own HUP signals.  
Suppose that you are using the CHECKPULSE patches for XDM, posted to this
newsgroup.  We have not been having any problems with it, but do you need
to also modify xterm to allow proper cleanup of the process group associated
with the session that the modified XDM is supposed to do?  XDMCP will no
doubt be great, but we need an interim solution to this problem now.

brooks@maddog.llnl.gov, brooks@maddog.uucp