Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Aug 1996 21:52:24 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-hackers@freebsd.org (FreeBSD hackers)
Subject:   Re: [ELM 2.4ME+ PL25 (25)] - folder is corrupt!
Message-ID:  <199608301952.VAA04330@uriah.heep.sax.de>
In-Reply-To: <199608301035.OAA00606@nagual.ru> from "[?KOI8-R?]" at "Aug 30, 96 02:35:27 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As [?KOI8-R?] wrote:

> > fcntl() on the entire file is identical to flock() -- they use the
> > same functions internally.
> 
> No, you lose your fcntl lock on any close of the file, so you
> can't fcntl lock passwd then use getpw*() functions, read

Ok.  So it's not identical, but the behaviour when locking a mail
spool is the same (as long as you don't apply getpw* functions to your
mail spool :).  I haven't tested it, but from reading the code it
looks as if two applications where one applies the lock with fcntl()
and the other one tests with flock() (or visa verse) will do the right
thing.

> man fcntl for more info. fcntl lock treated as depriciated
> in BSD.

It's not deprecated (after all, it's Posix), only stupid. ;)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608301952.VAA04330>