un-dedicating a line to a dialer

Guy Harris guy at rlgvax.UUCP
Sat Jan 7 15:31:57 AEST 1984


<anybody not fixed this bug yet?>

	The solution is to have the dialler program open the dial
	line with O_EXCL, which will return an error if a getty or login
	still has the line open.

Well, the V7 "exclusive use" bit for terminals (turned on and off by an "ioctl",
although the DZ driver (which looked suspiciously like a USG driver
retrofitted) didn't honor it) would do that, but the O_EXCL bit in System III
and 4.2BSD isn't an exclusive use open.  It permits you to use the existence
of a file as a lock - what it does is tells the kernel, when used with the
O_CREAT bit (which says "create the file if it doesn't exist), to return an
error if the file exists.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.unix.wizards mailing list