From owner-freebsd-hackers Thu Oct 23 11:08:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA15427 for hackers-outgoing; Thu, 23 Oct 1997 11:08:52 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.5.85]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA15422 for ; Thu, 23 Oct 1997 11:08:50 -0700 (PDT) (envelope-from tlambert@usr02.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.7/8.8.7) id LAA15746; Thu, 23 Oct 1997 11:08:50 -0700 (MST) Received: from usr02.primenet.com(206.165.6.202) via SMTP by smtp04.primenet.com, id smtpd015739; Thu Oct 23 11:08:44 1997 Received: (from tlambert@localhost) by usr02.primenet.com (8.8.5/8.8.5) id LAA28324; Thu, 23 Oct 1997 11:08:40 -0700 (MST) From: Terry Lambert Message-Id: <199710231808.LAA28324@usr02.primenet.com> Subject: Re: Possible SERIOUS bug in open()? To: thorpej@nas.nasa.gov Date: Thu, 23 Oct 1997 18:08:40 +0000 (GMT) Cc: tlambert@primenet.com, dk+@ua.net, freebsd-hackers@freebsd.org In-Reply-To: <199710231756.KAA04569@lestat.nas.nasa.gov> from "Jason Thorpe" at Oct 23, 97 10:56:17 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > I need to hold a reference. The "lock against eject" operation is > > a side effect of an existing reference forcing the count over 1 for > > the device in question. > > > > So the short answer is "to obtain reference side effects without > > granting read/write access on the descriptor". > > I think "open for not read not write" is a silly way to do this, personally. > > If you want to add/delete "artificial references", then invent a real > interface for it, don't use a hack like open with non-sensical flags. By this logic, locking should be implemented via a system call instead of a hack like fcntl(). 8-(. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.