From owner-freebsd-hackers Thu Aug 6 16:11:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA29674 for freebsd-hackers-outgoing; Thu, 6 Aug 1998 16:11:18 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail.camalott.com (mail.camalott.com [208.203.140.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA29602 for ; Thu, 6 Aug 1998 16:10:54 -0700 (PDT) (envelope-from joelh@gnu.org) Received: from detlev.UUCP (tex-129.camalott.com [208.229.74.129]) by mail.camalott.com (8.8.7/8.8.5) with ESMTP id SAA19405; Thu, 6 Aug 1998 18:11:47 -0500 Received: (from joelh@localhost) by detlev.UUCP (8.8.8/8.8.8) id SAA01179; Thu, 6 Aug 1998 18:10:25 -0500 (CDT) (envelope-from joelh) Date: Thu, 6 Aug 1998 18:10:25 -0500 (CDT) Message-Id: <199808062310.SAA01179@detlev.UUCP> To: n@nectar.com CC: mcgovern@spoon.beta.com, hackers@FreeBSD.ORG In-reply-to: (message from Jacques Vidrine on Thu, 06 Aug 1998 01:52:17 -0500) Subject: Re: O_SHLOCK and O_EXLOCK during open... (locking for devices?) From: Joel Ray Holveck Reply-to: joelh@gnu.org References: <199807311744.NAA13956@spoon.beta.com> <199808060549.AAA13226@detlev.UUCP> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> O_SHLOCK and O_EXLOCK are advisory, not mandatory. In other words, >> the apps are going to ignore them anyway. Lock files are the way to >> go. > Huh? > Sure, O_SHLOCK and O_EXLOCK are advisory, but so are lock files. > Applications are free to ignore any of them. I didn't mean to imply that lockfiles are mandatory. I meant that they are the recommended locking mechanism, since both are advisory anyway. All apps running now are pretty well guaranteed to not use flock. This is based on the fact that it doesn't work. A programmer being cautious enough to use flock would likely use uu lockfiles. So, use lockfiles so you can work with more apps. Best, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message