Aucbvax.4204 fa.unix-wizards utzoo!decvax!ucbvax!network Sat Oct 3 20:53:27 1981 at Berkeley Subject: Re: process interlocking problems in unix Via: Ucb-C70.ArpaNet; 3 Oct 81 17:43-PDT In-real-life: Steven M. Bellovin Location: University of North Carolina at Chapel Hill Phone: (919) 966-3305 If you have the multiplexor (or Bill Joy's new stuff) available, you can implement a locking process which runs the multiplexor channel. Processes wanting to lock on a resource open the lock 'file' and write a line that looks something like LOCK resource and then do a read. When it's free, the mpx driver writes back to them giving permission; others will be held pending a RELEASE line being written (or a close on the channel). There could also be a TEST line and maybe a non-blocking LOCK, which would return error status if it couldn't grant the request. ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.