Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Nov 1999 16:59:57 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        "Lowkrantz, Goran" <Goran.Lowkrantz@infologigruppen.se>
Cc:        "'stable@FreeBSD.ORG'" <stable@FreeBSD.ORG>, brian@hak.lan.Awfulhak.org
Subject:   Re: uu_lock semantics 
Message-ID:  <199911051659.QAA00327@hak.lan.Awfulhak.org>
In-Reply-To: Message from "Lowkrantz, Goran" <Goran.Lowkrantz@infologigruppen.se>  of "Thu, 04 Nov 1999 00:37:08 %2B0100." <B500F74C6527D311B61F0000C0DF5ADC0D4830@valhall.ign.se> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <brian@Awfulhak.org>                        <brian@FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour !          <brian@FreeBSD.org.uk>




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911051659.QAA00327>