*BSD News Article 57239


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!news.mathworks.com!uhog.mit.edu!uw-beaver!nntp.cs.ubc.ca!portal.ca!portal.ca!not-for-mail
From: curt@portal.ca (Curt Sampson)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Procmail 3.10 and flock()
Date: 18 Dec 1995 23:24:36 -0800
Organization: Internet Portal Services, Ltd.
Lines: 24
Message-ID: <4b5pbk$522@cynic.portal.ca>
NNTP-Posting-Host: cynic.portal.ca

I've just been attempting to install procmail 3.10 on a NetBSD 1.0
system, and this problem I've run into doesn't really make sense
to me. Procmail doesn't seem to like using flock() to lock the mail
file. When it runs its tests during the build, it chooses only
`.lock' and fcntl(). If I explicitly force it to use flock(), it
just pauses for a great deal of time, presumably waiting for a lock
to come off so it can deliver the mail.

I had a look through the mail.local source, and it generates a
`.lock' file (when given the -l option) and opens the file with
O_EXLOCK which puts an flock LOCK_EX on the file.

I had a look though the locking.c source for procmail and rapidly
realised that it's too late in the day for me to make sense out of
it. :-)

So why doesn't procmail want to use flock() locking?

cjs
-- 
Curt Sampson    curt@portal.ca		Info at http://www.portal.ca/
Internet Portal Services, Inc.	
Vancouver, BC   (604) 257-9400		De gustibus, aut bene aut nihil.