From owner-freebsd-hackers Wed Aug 5 22:49:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA02706 for freebsd-hackers-outgoing; Wed, 5 Aug 1998 22:49:19 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail.camalott.com ([208.203.140.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA02701 for ; Wed, 5 Aug 1998 22:49:18 -0700 (PDT) (envelope-from joelh@gnu.org) Received: from detlev.UUCP (tex-86.camalott.com [208.229.74.86]) by mail.camalott.com (8.8.7/8.8.5) with ESMTP id AAA01625; Thu, 6 Aug 1998 00:50:22 -0500 Received: (from joelh@localhost) by detlev.UUCP (8.8.8/8.8.8) id AAA13226; Thu, 6 Aug 1998 00:49:08 -0500 (CDT) (envelope-from joelh) Date: Thu, 6 Aug 1998 00:49:08 -0500 (CDT) Message-Id: <199808060549.AAA13226@detlev.UUCP> To: mcgovern@spoon.beta.com CC: hackers@FreeBSD.ORG In-reply-to: <199807311744.NAA13956@spoon.beta.com> (mcgovern@spoon.beta.com) 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> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Yup, me again with another dumb programming question.... Yup, me again with another late answer.... > I seem to be running in to problems when opeing up a device special > file with either O_SHLOCK or O_EXLOCK. I get an error back (45) that > the operation is not supported. > My question, then, is, how can I lock, lets say a serial port, > without having to go the route of lock-file creation, as many > applications ignore these files anyhow? 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. 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