* Peter Jeremy <[EMAIL PROTECTED]> [080808 17:13] wrote:
> On 2008-Aug-08 12:26:31 -0400, John Baldwin <[EMAIL PROTECTED]> wrote:
> >It should be setting D_TRACKCLOSE though so that close() reliably clears the 
> >flag even in single-threaded processes.  You can still get odd behavior if 
> >you explicitly open it twice in an app and then close one of the two fd's.  
> >You will no longer have IO permission even though you still have one fd 
> >open.  
> >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.

Sort of the same problem with sysv style fcntl locks. :(


-- 
- Alfred Perlstein
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to