[net.unix-wizards] Job control and hung tty lines

cche@ucdavis.UUCP (Hugh Everett) (08/01/85)

[ Rumor has it that the line eater has been gone for a long time ... ]

At U.C.Davis, we run 4.2bsd on several vax 750s.  The terminal lines are
handled through a develcon data switch.  When the switch drops CARRIER on
a line, (the user hung up), it assumes that the line will be available again
soon.  In fact, when a user is running csh, she can hang the line for an
indefinite period.  Csh changes the process group of a background process,
and ignores hangups for it as well.  This means that the process can have
the tty open, (stdout and stderr), but never see the hup signal.  The driver
cannot reopen until all those background processes close the tty file.

We have considered several options:
1.	make the switch ignore the line until unix is ready.
2.	fix csh
3.	fix the system to send SIGHUP to all processes which have the device open.
4.	mark files open on the driver to prevent further io; let the driver close.

Option 1 is said to be impossible by our switch guru.
Option 2, while messy, would work, but does not account for other software
	which plays with process groups.
Option 3 is difficult because the process ids are not readily accessible from
	the device interrupt routine.
Option 4 looks ok, we can (at some cost) get the file table entries for all
	files open on the device, but we must fix ALL the routines which use the
	file table.

Having gotten this far, I am convinced this is a lot of work.  I therefore turn
to you, wizards, in hopes that I have missed something, or that somebody
out there has already bitten the bullet, done the work and is willing to share.

	Many thanks in advance!

		Hugh Everett			Uucp: ucbvax!ucdavis!cche
		Computer Center
		U. C. Davis
		Davis, Ca. 95616