From owner-freebsd-hackers Tue Aug 24 2:39:13 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from not.demophon.com (ns.demophon.com [193.65.70.13]) by hub.freebsd.org (Postfix) with ESMTP id 8E726150B2 for ; Tue, 24 Aug 1999 02:39:10 -0700 (PDT) (envelope-from will@not.demophon.com) Received: (from will@localhost) by not.demophon.com (8.9.3/8.8.7) id MAA57813; Tue, 24 Aug 1999 12:38:40 +0300 (EEST) (envelope-from will) To: John-Mark Gurney Cc: hackers@freebsd.org, grog@lemis.com Subject: Re: Mandatory locking? References: <19990823223645.A14001@netmonger.net> <19990824021431.55023@hydrogen.fircrest.net> From: Ville-Pertti Keinonen Date: 24 Aug 1999 12:38:38 +0300 In-Reply-To: gurney_j@efn.org's message of "24 Aug 1999 12:22:48 +0300" Message-ID: <86pv0djz6o.fsf@not.demophon.com> Lines: 19 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG gurney_j@efn.org (John-Mark Gurney) writes: > Ville-Pertti Keinonen scribbled this message on Aug 24: > > cat writes part of oldmail to /var/mail/grog > > sendmail locks /var/mail/grog > > (cat may try to write more to /var/mail/grog but blocks) > > sendmail delivers new mail > > sendmail unlocks /var/mail/grog > > cat writes the rest of oldmail to /var/mail/grog > > > > You'll still probably end up with a broken mailbox. > > what you do is this: > lockf -k $mailfile cat ${mailtmp} >> $mailfile Which doesn't support Greg's arguments for mandatory locking, as you're now doing locking in both programs. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message