Xenix Help ? MapChan : Shell Layers : Backup : File Locking

Brad Morrison morrison at ficc.uu.net
Thu Jun 8 22:54:11 AEST 1989


In article <724 at mitisft.Convergent.COM>, dold at mitisft.Convergent.COM (Clarence Dold) writes:
> in article <1169 at cheops.eecs.unsw.oz>, ashley at 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 at ficc.uu.net



More information about the Comp.unix.xenix mailing list