home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / wizards / 3657 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.5 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!klaava!hurtta
  2. From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
  3. Newsgroups: comp.unix.wizards
  4. Subject: Re: flock() network behaviour
  5. Message-ID: <HURTTA.92Aug20165725@plootu.Helsinki.FI>
  6. Date: 20 Aug 92 14:57:25 GMT
  7. References: <1992Aug20.114112.12756@fwi.uva.nl>
  8. Sender: news@klaava.Helsinki.FI (Uutis Ankka)
  9. Organization: Department of Computer Science, University of Helsinki, Finland
  10. Lines: 27
  11. In-Reply-To: stolk@fwi.uva.nl's message of 20 Aug 92 11: 41:12 GMT
  12.  
  13. In article <1992Aug20.114112.12756@fwi.uva.nl> stolk@fwi.uva.nl (Bram) wrote:
  14. > I am using flock() to prevent simultanous fileupdate by several
  15. > processes.
  16. > However, these processes run on different machines, which do
  17. > share a common filesystem though....
  18. > Will the fact that the processes run on different machines mess
  19. > up the behaviour of flock?
  20.  
  21. At least in SunOS flock don't work between in machines (as man page states):
  22.  
  23. BUGS
  24.      Locks obtained through the flock() mechanism are known  only
  25.      within the system on which they were placed.  Thus, multiple
  26.      clients may successfully acquire exclusive locks on the same
  27.      remote  file.   If  this behavior is not explicitly desired,
  28.      the fcntl(2V)  or  lockf(3)  system  calls  should  be  used
  29.      instead;  these make use of the services of the network lock
  30.      manager (see lockd(8C)).
  31.  
  32. - K E H
  33. ( Kari.Hurtta@Helsinki.FI,
  34.   hurtta@cc.Helsinki.FI,
  35.   hurtta@cs.Helsinki.FI,
  36.   HURTTA@FINUH.BITNET
  37. )
  38.