[comp.windows.x] xterm logging off all users on system

dsouza@astroatc.UUCP (Lew Dsouza) (08/11/88)

Following is an excerpt from the README file in the xterm directory of
Release 10.4:

>Xterm is in a reasonably usable state.  We are sick and tired of working
>on it, but there are clearly major areas of improvement possible.
>				...
>If you feel motivated to work on xterm, the following are
>areas which need improvement.
>				...
>
>	13) figure out what we're doing wrong with SIGHUP on exit (code is
>notdef'd out to aviod disaster when you are root; it was logging everyone
>out simultaneously!).  Sighup should be sent to the process group when
>xterm exits.
>				...
>
>				Jim Gettys
>				January 1986

Has anyone out there figured out why this happens? Is there a fix?
Other side effects include all the daemons (lpd, cron etc.) being killed. 

We are running X V10.4 on a 4.2 BSD UNIX system. Does'nt anyone use V10R4 
anymore? I ported the 4.3 getty, login and init, and used the 4.3 /etc/ttys 
format to get X fired up from "init"

Does the following reasoning seem correct?
xterm sends out a SIGHUP to all proccesses in its group. Somehow "init" 
also happens to be in the same process group. Upon receiving the SIGHUP, 
init spawns gettys on every line essentially bumping every one else off the 
system.

I replaced the setpgrp(0,0) in main.c with setpgrp(0,getpid()) in an attempt
to put xterm and all it's children in a different process group. But this
did not fix the problem.

Is there anyone out there with insight into this? Please email.

		Thanks in advance,
								Lew.
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lew Dsouza                                       uwvax!astroatc!dsouza
Astronautics Technology Center                   (608) 221-9001 Ext. 251