home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!cs.utexas.edu!torn!cunews!csi.uottawa.ca!news
- From: dominic@scooter.genie.uottawa.ca (Dominic Richens)
- Subject: Re: File locking question
- Message-ID: <1992Jul30.183006.15648@csi.uottawa.ca>
- Originator: dominic@
- Sender: news@csi.uottawa.ca
- Nntp-Posting-Host: scooter.genie.uottawa.ca
- Reply-To: dominic@shamin.genie.uottawa.ca
- Organization: MCRLab - University of Ottawa
- References: <1992Jul30.125226.16473@dragon.acadiau.ca>
- Date: Thu, 30 Jul 92 18:30:06 GMT
- Lines: 23
-
-
- In article <1992Jul30.125226.16473@dragon.acadiau.ca>, alan@dragon.acadiau.ca (Alan McKay) writes:
- ! Will file locking work properly on an NFS disk mounted on multiple
- ! hosts? I want to lock a file in the user's home directory so that
- ! other active sessions cannot touch the file (yes, the other sessions
- Yes, if the locking is advisory.
-
- ! are checking the lock too). However, other sessions could be on
- ! any one of a number of machines, included Suns and a CDC4680. Will
- ! "flock"ing still work?
- No.
-
- You want `lockf', which, depending on the mode of the file, will
- give you an advisory lock that will work over NFS. Look at the man page
- for lockf(3/S) for specifics. Also you might want to browse lockd(8C/NADM),
- and chmod(2/S).
-
- dominic
- --
- !@$^&*)($#$@!@#$^&*()_+_)(*&^$#@!$^&*()_+)(*&^$#@$^&*+_(*&^$#@#^&*()&*$#@(*&+_$!
- Dominic Richens : dominic@shamin.genie.uottawa.ca : Tel. (613) 564 9911
- MCRLab, Dept of Elec Eng, University of Ottawa, K1N 6N5, CANADA
- "You construct intricate rituals which allow you to touch the skin of other men"
-