Path: utzoo!attcan!uunet!husc6!cs.utexas.edu!sun-barr!texsun!texbell!sugar!ficc!morrison From: morrison@ficc.uu.net (Brad Morrison) Newsgroups: comp.unix.xenix Subject: Re: Xenix Help ? MapChan : Shell Layers : Backup : File Locking Summary: Try LK_NBLCK Message-ID: <4453@ficc.uu.net> Date: 8 Jun 89 12:54:11 GMT References: <1169@cheops.eecs.unsw.oz> <724@mitisft.Convergent.COM> Organization: {xe,u}nix Support Lines: 16 In article <724@mitisft.Convergent.COM>, dold@mitisft.Convergent.COM (Clarence Dold) writes: > in article <1169@cheops.eecs.unsw.oz>, ashley@cheops.eecs.unsw.oz (Ashley M. Aitken) says: > > File "Locking": > > > > I would like to lock a file while someone is editing it . . . > A wrapper in this sense would open the target with a lock, then invoke > the editor of choice via exec. If you have an exclusive lock, and a mandatory > locking file system, then someone else starting a vi would pause, > waiting for the lock to be released. Unless you try to lock without blocking; you can return immediately and check errno for the EACCESS error. -- Grep me no patterns and | Brad Morrison (713) 274-5449 I'll tell you no lines. | uunet!ficc!morrison morrison@ficc.uu.net