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

Re: flock() and sendmail



On Fri, 17 Nov 2006 19:09:33 +0100, Kurt Roeckx <kurt@roeckx.be>
wrote:

>Anyway, from the linux/Documentation/locks.txt file:
>1.2.1 Typical Problems - Sendmail
>---------------------------------
>Because sendmail was unable to use the old flock() emulation

I believe flock() *emulation* is no longer used in 2.6 kernels.


>installations use fcntl() instead of flock(). This is true of Slackware 3.0
>for example. This gave rise to some other subtle problems if sendmail was
>configured to rebuild the alias file. Sendmail tried to lock the aliases.dir
>file with fcntl() at the same time as the GDBM routines tried to lock this
>file with flock(). With pre 1.3.96 kernels this could result in deadlocks that,
>over time, or under a very heavy mail load, would eventually cause the kernel
>to lock solid with deadlocked processes.

Then I have to wonder why sendmail is still configured to use fcntl()
when running on linux.  Sounds like the modern kernel implementation
of flock() would be better.




Reply to: