[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: flock() and sendmail



John Kelly <jak@isp2dial.com> writes:

> I need to make some local customizations, and it seemed like a good
> idea, while I'm in there, to use flock() instead of fcntl(), if there
> are no conflicts.

It's almost always a bad idea to use flock() instead of fcntl().
fnctl() locking is effectively deprecating flock(), and you need a
really good reason not to use it in favour of fcntl().

If you look at SUSv3/POSIX, you'll see that fcntl()/lockf() locking is
the only standardised form of locking.  flock() isn't included in the
standard.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: pgpGNGQ8g_Thg.pgp
Description: PGP signature


Reply to: