Subject: Re: Time to fix a 25 year old misdesign
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Lennart Augustsson <firstname.lastname@example.org>
Date: 10/17/2000 09:37:46
"Greg A. Woods" wrote:
> [ On Tuesday, October 17, 2000 at 05:42:30 (+0200), Lennart Augustsson wrote: ]
> > Subject: Re: Time to fix a 25 year old misdesign
> > Comments?
> I still haven't seen any solid reasons for doing this.....
> Keep in mind that the SIGIO issue can be dealt with by simply requiring
> drivers that support it to always force exclusive access (or to prevent
> process which did not successfully request and receive exclusive access
> to never enable async-IO.
That's not true! Well, it's sort of true, but there is no way a driver can enforce
exclusive access. The driver is never asked when a fork() is performed, so
it cannot stop the file descriptor from being shared between two processes.
Thinking that the current design allows a single process to have a exclusive
access to a device is wrong. If the process chooses it can always fork().
BTW, with my proposed incref()/decref() extension the driver could enforce
exclusive access. :)