From owner-freebsd-questions Sat Nov 23 20:23:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7C7637B401 for ; Sat, 23 Nov 2002 20:23:13 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C51F43E3B for ; Sat, 23 Nov 2002 20:23:13 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.6) id gAO4N6Hf069793; Sat, 23 Nov 2002 22:23:06 -0600 (CST) (envelope-from dan) Date: Sat, 23 Nov 2002 22:23:06 -0600 From: Dan Nelson To: Doug Lee , freebsd-questions@FreeBSD.ORG Subject: Re: Is this a good time for a procmail global lock file? Message-ID: <20021124042306.GC4795@dan.emsphone.com> References: <20021123185018.GJ55241@kirk.dlee.org> <20021123193700.GB4795@dan.emsphone.com> <20021123201040.GM55241@kirk.dlee.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021123201040.GM55241@kirk.dlee.org> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Nov 23), Doug Lee said: > On Sat, Nov 23, 2002 at 01:37:00PM -0600, Dan Nelson wrote: > > It's likely that procmail does not lock LOGFILE, and from looking > > at the source it writes the abstract with a huge number of separate > > write() calls. You're probably stuck with using a global lockfile, > > which should force serial access to procmail. If you only have one > > rule in your procmailrc, it's no worse than a local lockfile. If > > you've got a bunch, you might need to log the abstracts manually > > with a single write call (or rewrite procmail's logging functions). > > A call to /usr/bin/printf with the appropriate format string should > > work. > > I have a bunch of rules, but with maybe 360 emails/day, it won't slow > things down too much to force serial access... > > but could I create deadlocks this way by accident? I do not call > procmail directly from a recipe, but I do have filter rules that pipe > through other stuff. If you run another program that also locks its files, make sure that program never calls procmail and you should be okay. Sending an email to an address that ends up back in procmail may or may not cause a deadlock, depending on whether your sendmail is set to deliver immediately or queue incoming email. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message