Subject: Re: flock() fails with procmail
To: Curt Sampson <>
From: Zdenek Salvet <>
List: current-users
Date: 06/18/1996 13:20:33
> I thought I'd sent out a note about this before, but I didn't see
> it come by, so perhaps it didn't make it out the first time.
> Procmail can't seem to use flock. (I'm using 3.11pre4, but this is
> true of 3.10 as well.) It's never able to get a lock on the file.
> This is bad, because flock() is the sole locking method of
> /usr/libexec/mail.local, unless the -l flag is specified.
> I'm having a great deal of trouble decoding the code in procmail,
> but I can't see anything terribly unusual about its locking so
> far.
> Has anyone else run into this? Is this a problem with NetBSD or
> with procmail?

Procmail will use flock if you tell it not to use fcntl. Default choice
is OK because fcntl manpage says:

 Note that flock(2) and fcntl(2) locks may be safely used concurrently.

Zdenek Salvet                                     
           If God had meant for us to be in the Army,
         we would have been born with green, baggy skin.