From: Doug Evans (dje@sspiff.cygnus.com)
Date: 11/15/92


From: dje@sspiff.cygnus.com (Doug Evans)
Subject: Re: C code porting question [?]
Date: Sun, 15 Nov 1992 11:50:50 GMT

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