Re: flock() and sendmail

2006-11-17 Thread Roger Leigh
John Kelly [EMAIL PROTECTED] 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

Re: flock() and sendmail

2006-11-17 Thread John Kelly
On Fri, 17 Nov 2006 11:14:21 +, Roger Leigh [EMAIL PROTECTED] wrote: It's almost always a bad idea to use flock() instead of fcntl(). fnctl() locking is effectively deprecating flock() I heard it was the other way around. Please explain ... If you look at SUSv3/POSIX, you'll see that

Re: flock() and sendmail

2006-11-17 Thread Michael Banck
On Fri, Nov 17, 2006 at 01:02:15PM +, John Kelly wrote: On Fri, 17 Nov 2006 11:14:21 +, Roger Leigh [EMAIL PROTECTED] wrote: It's almost always a bad idea to use flock() instead of fcntl(). fnctl() locking is effectively deprecating flock() I heard it was the other way around.

Re: flock() and sendmail

2006-11-17 Thread John Kelly
On Fri, 17 Nov 2006 15:42:21 +0100, Michael Banck [EMAIL PROTECTED] wrote: On Fri, Nov 17, 2006 at 01:02:15PM +, John Kelly wrote: On Fri, 17 Nov 2006 11:14:21 +, Roger Leigh [EMAIL PROTECTED] wrote: It's almost always a bad idea to use flock() instead of fcntl(). fnctl() locking is

Re: flock() and sendmail

2006-11-17 Thread Michael Banck
On Fri, Nov 17, 2006 at 03:37:56PM +, John Kelly wrote: I'm discussing flock() with the debain sendmail package and the linux 2.6 kernel. Or does that annoy you too? To be honest, I don't see why this should concern all other Debian developers, yes. Michael -- To UNSUBSCRIBE, email

Re: flock() and sendmail

2006-11-17 Thread Kurt Roeckx
On Thu, Nov 16, 2006 at 11:24:34AM -0800, Richard A Nelson wrote: On Thu, 16 Nov 2006, John Kelly wrote: I don't need NFS with sendmail. Surely flock() is not *still* broken in 2.6 kernels? I doubt that flock is *still* broken - that was quite some time ago... From the flock manpage

Re: flock() and sendmail

2006-11-17 Thread John Kelly
On Fri, 17 Nov 2006 18:33:10 +0100, Michael Banck [EMAIL PROTECTED] wrote: On Fri, Nov 17, 2006 at 03:37:56PM +, John Kelly wrote: I'm discussing flock() with the debain sendmail package and the linux 2.6 kernel. Or does that annoy you too? To be honest, I don't see why this should

Re: flock() and sendmail

2006-11-17 Thread John Kelly
On Fri, 17 Nov 2006 19:09:33 +0100, Kurt Roeckx [EMAIL PROTECTED] 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

Re: flock() and sendmail

2006-11-17 Thread Richard A Nelson
On Fri, 17 Nov 2006, John Kelly wrote: 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. The most general solution wins ... and that is fcntl() ! afaict, flock() *still* does

Re: flock() and sendmail

2006-11-17 Thread Kurt Roeckx
On Fri, Nov 17, 2006 at 06:27:13PM +, John Kelly wrote: On Fri, 17 Nov 2006 19:09:33 +0100, Kurt Roeckx [EMAIL PROTECTED] wrote: Anyway, from the linux/Documentation/locks.txt file: 1.2.1 Typical Problems - Sendmail - Because sendmail was unable to use

Re: flock() and sendmail

2006-11-17 Thread John Kelly
On Fri, 17 Nov 2006 19:54:13 +0100, Kurt Roeckx [EMAIL PROTECTED] wrote: I actually see no good reason to want to use flock() over fcntl(). Maybe because the fcntl() interface follows the completely stupid semantics of System V and IEEE Std 1003.1-1988 (``POSIX.1'') that require that all locks

Re: flock() and sendmail

2006-11-17 Thread Michael Banck
On Fri, Nov 17, 2006 at 06:12:44PM +, John Kelly wrote: Heil Hitler! QED. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: flock() and sendmail

2006-11-17 Thread John Kelly
On Fri, 17 Nov 2006 20:09:54 +0100, Michael Banck [EMAIL PROTECTED] wrote: On Fri, Nov 17, 2006 at 06:12:44PM +, John Kelly wrote: Heil Hitler! QED. Godwin's law only applies when the comparison is unfair.

Re: flock() and sendmail

2006-11-17 Thread Kurt Roeckx
On Fri, Nov 17, 2006 at 07:03:00PM +, John Kelly wrote: On Fri, 17 Nov 2006 19:54:13 +0100, Kurt Roeckx [EMAIL PROTECTED] wrote: I actually see no good reason to want to use flock() over fcntl(). Maybe because the fcntl() interface follows the completely stupid semantics of System

Re: flock() and sendmail

2006-11-16 Thread Richard A Nelson
On Thu, 16 Nov 2006, John Kelly wrote: I don't need NFS with sendmail. Surely flock() is not *still* broken in 2.6 kernels? I doubt that flock is *still* broken - that was quite some time ago... ** NOTE: Override HASFLOCK as you will but, as of 1.99.6, mixed-style ** file locking

Re: flock() and sendmail

2006-11-16 Thread John Kelly
On Thu, 16 Nov 2006 11:24:34 -0800 (PST), Richard A Nelson [EMAIL PROTECTED] wrote: ** NOTE: Override HASFLOCK as you will but, as of 1.99.6, mixed-style ** file locking is no longer allowed. In particular, make sure ** your DBM library and sendmail are both using either flock(2) **

flock() and sendmail

2006-11-15 Thread John Kelly
is no longer allowed. In particular, make sure ** your DBM library and sendmail are both using either flock(2) ** *or* fcntl(2) file locking, but not both. I don't need NFS with sendmail. Surely flock() is not *still* broken in 2.6 kernels? Any advice?