Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1a 12/4/83; site rlgvax.UUCP Path: utzoo!linus!decvax!harpo!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: un-dedicating a line to a dialer Message-ID: <1526@rlgvax.UUCP> Date: Sat, 7-Jan-84 00:31:57 EST Article-I.D.: rlgvax.1526 Posted: Sat Jan 7 00:31:57 1984 Date-Received: Sun, 8-Jan-84 00:47:52 EST References: <15002@sri-arpa.UUCP> <209@basservax.SUN> Organization: CCI Office Systems Group, Reston, VA Lines: 16 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