Date: Sat, 9 Aug 2008 10:12:56 +1000 From: Peter Jeremy <peterjeremy@optushome.com.au> To: John Baldwin <jhb@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Ed Schouten <ed@freebsd.org>, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/io iodev.c Message-ID: <20080809001256.GL64458@server.vk2pj.dyndns.org> In-Reply-To: <200808081226.32089.jhb@freebsd.org> References: <200808081343.m78DhwYE068477@repoman.freebsd.org> <200808081226.32089.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <jhb@freebsd.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080809001256.GL64458>