home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 16816 < prev    next >
Encoding:
Text File  |  1992-11-15  |  1.3 KB  |  34 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!decwrl!sspiff!dje
  3. From: dje@sspiff.cygnus.com (Doug Evans)
  4. Subject: Re: C code porting question [?]
  5. References: <1992Nov10.155619.4245@telex.mn.org>
  6. Organization: Cygnus Support
  7. Date: Sun, 15 Nov 1992 11:50:50 GMT
  8. X-Newsreader: Tin 1.1 PL4
  9. Message-ID: <1992Nov15.115050.7578@sspiff.cygnus.com>
  10. Lines: 22
  11.  
  12. brian@telex.mn.org (Brian K. Teravskis) writes:
  13. >Hello fellow Linuxers:
  14. >
  15. >I am trying to port over a BSD program to Linux (SLS 0.98), and
  16. >I ran into a couple of modules that use the function flock and
  17. >the LOCK_NB, LOCK_EX constants. After perusing through the
  18. >include files I could not find any reference to flock or
  19. >the constants. I want to know how file locking (as it is) is
  20. >done under Linux. I would guess that it follows the POSIX lock
  21. >file creation with the O_CREAT and O_EXCL, but I want to make
  22. >sure that I'm following the 'correct' way of doing it.
  23.  
  24. For what it's worth, Linux has fcntl(F_SETLK) and friends (which is POSIX).
  25.  
  26. The relevant .h files say it isn't implemented, but it is.
  27.  
  28. Linus, can we update the .h's?
  29. -- 
  30. Doug Evans               | And Life, that sets all things in rhyme,
  31. dje@sspiff.cygnus.com    | May make you poet, too, in time -
  32.                          | But there were days, O tender elf,
  33.                          | When you were Poetry itself!         C. Morley
  34.