From owner-cvs-src@FreeBSD.ORG Sat Aug 9 00:13:03 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3CF81065687; Sat, 9 Aug 2008 00:13:02 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.freebsd.org (Postfix) with ESMTP id 7FAD48FC0A; Sat, 9 Aug 2008 00:13:02 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail18.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m790Cus0019860 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Aug 2008 10:12:58 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.2) with ESMTP id m790CuO3057408; Sat, 9 Aug 2008 10:12:56 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m790Cu7d057407; Sat, 9 Aug 2008 10:12:56 +1000 (EST) (envelope-from peter) Date: Sat, 9 Aug 2008 10:12:56 +1000 From: Peter Jeremy To: John Baldwin Message-ID: <20080809001256.GL64458@server.vk2pj.dyndns.org> References: <200808081343.m78DhwYE068477@repoman.freebsd.org> <200808081226.32089.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8bBEDOJVaa9YlTAt" Content-Disposition: inline In-Reply-To: <200808081226.32089.jhb@freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Ed Schouten , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/io iodev.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2008 00:13:03 -0000 --8bBEDOJVaa9YlTAt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Aug-08 12:26:31 -0400, John Baldwin wrote: >It should be setting D_TRACKCLOSE though so that close() reliably clears t= he=20 >flag even in single-threaded processes. You can still get odd behavior if= =20 >you explicitly open it twice in an app and then close one of the two fd's.= =20 >You will no longer have IO permission even though you still have one fd op= en. =20 >However, if you do that I think you deserve what you asked for. :) That behaviour may be legitimate: Your code links with libraries foo and bar that each independently open /dev/io so they can frob different things in IO space. libfoo needs ongoing access to device foo and so keeps its descriptor open. libbar only needs once-off access to device bar and so closes /dev/io once it's finished its initialisation. Libraries foo and bar are completely independent and shouldn't need to know anything about each other and your app shouldn't need to know that libraries it's using frob around in IO space. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --8bBEDOJVaa9YlTAt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkic4QgACgkQ/opHv/APuIdmIwCeKJbAmuO/g1tOHyIZWcTKUtFk /mAAnR23TkvYv/4weqgDM3WKT0A1XJly =JH4W -----END PGP SIGNATURE----- --8bBEDOJVaa9YlTAt--