From owner-freebsd-stable Sat Nov 6 3:23:42 1999 Delivered-To: freebsd-stable@freebsd.org Received: from awfulhak.org (dynamic-87.max4-du-ws.dialnetwork.pavilion.co.uk [212.74.9.215]) by hub.freebsd.org (Postfix) with ESMTP id CBD4914DE2 for ; Sat, 6 Nov 1999 03:23:32 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id LAA00359; Sat, 6 Nov 1999 11:23:30 GMT (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id QAA00327; Fri, 5 Nov 1999 16:59:58 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <199911051659.QAA00327@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.0 09/18/1999 To: "Lowkrantz, Goran" Cc: "'stable@FreeBSD.ORG'" , brian@hak.lan.Awfulhak.org Subject: Re: uu_lock semantics In-Reply-To: Message from "Lowkrantz, Goran" of "Thu, 04 Nov 1999 00:37:08 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 05 Nov 1999 16:59:57 +0000 From: Brian Somers Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > System: 3.3-STABLE FreeBSD 3.3-STABLE #1: Wed Nov 3 06:36:59 CET 1999 > > Two questions about uu_lock that have surfaced during a test. > > 1- Should a second call to uu_lock for the same resource from the same > process without a call to uu_unlock between them return "UU_LOCK_INUSE: The > lock is in use by another process.", because that is what I get. This is what I'd expect. If the application doesn't know that it's already got the lock, then it's likely that it'll try to open the device a second time, expecting to have exclusive access to the device. > 2- I assume that uu_lock should be called before first open and uu_unlock > after last close, as open and close have no connection to the lock handling. > Is this true? Yes. > Regarding question 1, I understand why it should be so, but I think this > could be documented on the man-page, as it's easy to assume recursive locks. Patches are always welcome :-) > Cheers, > GLZ > > --- > Goran Lowkrantz Email : goran.lowkrantz@infologigruppen.se > Infologigruppen Alfa AB Telephone: Nat 070-587 8782 Fax: Nat 070-615 > 8782 > Box 202 Int +46 70-587 8782 Int +46 70-615 > 8782 > 941 25 Pitea, Sweden -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message