procmail
[Top] [All Lists]

Re: Mixing flock() and lockfiles

1996-07-04 23:06:16
Ray DeGennaro (@Home via Eudora) <degennar(_at_)bmsrs(_dot_)usc(_dot_)edu> 
wrote:
Ok, I checked both elm (elm -v) and procmail (procmail -v) and the both use
dotlocking and fcntl() and procmail also uses lockf().  Does that mean that
if I use the following recipe to write to my system mailbox:
       #the popserver uses the file /tmp/.<username>.pop
       :0:/tmp/.$LOGNAME.pop
       $DEFAULT

procmail will use fcntl() and lockf() (but not dotlocking) and I shouldn't
get a collision with either elm (due to fcntl()), nor the popserver (using
the same lockfile)?

Yes, that's exactly what it means.  The only thing that could go wrong
is if the lockingtests that autoconf of procmail did at compile time
were not exhaustive enough (e.g. they were tested locally only,
and your mailbox is NFS mounted, or similar), in which case fcntl()
might not work on the filesystem you need it on.

Also, one of the comments about 3.11pre4 says that it allows users that
can't write to the system mail directory to lock their mail file.  Does
refer to the use of both fcntl() and lockf()?  Or is there another scheme

It uses fcntl()/lockf()/flock(), if available, if not, then it doesn't
work.
-- 
Sincerely,                                                          
srb(_at_)cuci(_dot_)nl
           Stephen R. van den Berg (AKA BuGless).

"To err is human, to debug ... divine."

<Prev in Thread] Current Thread [Next in Thread>