un-dedicating a line to a dialer

Chris Maltby chris at basservax.SUN
Wed Jan 11 12:22:04 AEST 1984


Sorry about the item suggesting O_EXCL open as the
dialler solution. Long ago, we changed our various terminal
drivers to look for FEXCL in open calls, and examine and set XCLUDE
in the tty flags. It really is quite useful (see example above).

The code goes something like this:

	if ((tp->t_state&(ISOPEN|WOPEN)) == 0)
	{
		...
	}
	else if (((tp->t_state & XCLUDE) || (flag&FEXCL)) && !(flag&FFORCE))
	{
		u.u_error = ENXIO;
		return;
	}
	if (flag&FEXCL)
		tp->t_state |= XCLUDE;

FFORCE corresponds to a new open option O_FORCE (super user only)
which allows the XCLUDE to be overridden.



More information about the Comp.unix.wizards mailing list