Re: Linux file locking

トップ ページ
このメッセージを削除
このメッセージに返信
著者: John Henders
日付:  
To: exim-users
題目: Re: Linux file locking
[Phillip sent me the mail my system bounced last night, so I'm just
getting caught up on the discussion. It's not a good idea to set a
message size limit in exim at the moment.]

Neal Becker <Neal.Becker@???> writes:

> John> This poses a bit of a problem with exim, because from what I can tell,
> John> the recommended standard we are being advised to use with Linux is
> John> flock(), and exim uses fcntl. This means either we (linux exim users)
> John> will need to change libgdbm to fcntl and make sure all programs we use
> John> use fcntl, or exim will have to have optional flock() locking on Linux.
>
> It is unfortunate that someone is pushing flock on linux. I have
> already discussed preferring fcntl with the maintainers of libgdbm. I
> have also discussed this with the Debian maintainers who tell me that
> Debian is *already using fcntl for libgdbm*. I guess right now we'll
> have to leave the option open.
>


I'd certainly like to see a more flexible arrangement with the locking
under linux but I must confess I don't understand the issues well enough
to argue convincingly for it with Linus or the person working on the
kernel locking code. From the man pages for flock() and fcntl(), it
certainly looks like fcntl is a more flexible function. The biggest
problem with the exclusiveness in the new kernels is that it means
you'll have to make sure everything uses one or the other, including
system libraries like gdbm.

Since 0.41 came out, I've got a new PC and had installed Redhat on it.
It's gdbm is using flock(), or at least I'm guessing it did, as I had
locking problems with 0.43 until I changed it to lock with flock(). I
tried relacing gdbm with the Debian one, but Redhat has hacked
gdbm-1.7.3 to call itself 2.0.0 so that broke perl when I removed 2.0.0.
I suppose I could rebuild gdbm with a higher version number, or link
exim against a static libgdbm with fcntl.

I'm tempted to just use libdbm, like Nigel.


-- 
      Artificial Intelligence stands no chance against Natural Stupidity.
                GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
                     b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*