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