Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utcsrgv.UUCP Path: utzoo!utcsrgv!dave From: dave@utcsrgv.UUCP (Dave Sherman) Newsgroups: net.bugs.uucp Subject: Re: LCK. files and cu (low flame) Message-ID: <2227@utcsrgv.UUCP> Date: Mon, 12-Sep-83 15:38:19 EDT Article-I.D.: utcsrgv.2227 Posted: Mon Sep 12 15:38:19 1983 Date-Received: Mon, 12-Sep-83 16:02:20 EDT References: <1003@ittvax.UUCP> Organization: The Law Society of Upper Canada, Toronto Lines: 21 Alan Watt has a point about exclusive use having to be set after the file is open, causing a race condition. Maybe this is time to consider adding options to open() which can be OR'ed into the higher bits of the second argument. Exclusive-use is an obvious candidate. Presumably, it wouldn't be hard to change stdio to add some letter (say, 'e') to the fopen call (e.g., fopen(iop, "we")), if necessary. Then again, I can see this leading to a horribly complex system, with a lot of overlap between open and ioctl, once it extends beyond exclusive-use. Incidentally, not all drivers implement TIOCEXCL. (Yes, Virginia, exclusive-use is implemented in the *driver*.) I have had to add a check for ISOPEN&XCLUDE to both the kl.c (DLV-11J) and dz.c (DZV-11) drivers on the lsuc 11/23 running v7. Dave Sherman The Law Society of Upper Canada Toronto -- {cornell,decvax,floyd,ihnp4,linus,utzoo,uw-beaver,watmath}!utcsrgv!lsuc!dave