Re: cdevsw close never called
Re: cdevsw close never called
- Subject: Re: cdevsw close never called
- From: Andrew Gallatin <email@hidden>
- Date: Fri, 06 Mar 2009 15:41:03 -0500
mm w wrote:
Hello Andrew,
a simple question,
A has opened /dev/file000
B for obscur reason wants to access /dev/file000 (could create an alias)
B is a process out of my control, looking for something to open, and
is iterating over file0..N, attempting to open each one until
he succeeds or runs out of device nodes to try.
Heck, it is a potentially malicious program opening and closing each
device node in a tight loop, for all I know. I've got to deal with
whatever happens in the wild.
tuple processes
if (proc (A...B C...) hold /dev/file000 || /dev/file000 on job)
return copy refA;
else
... open stuff
I think it's at your design level that you have to deal with that
you have to create your own stack to know what's going on, but maybe
there is a prebuilt
stuff to handle it I don't know, but I almost sure not
I'm not sure what you mean. I don't control anything in userspace.
I only control the driver side. I'd love to have a factory device like
Solaris, which sort of does what I think you're trying to describe.
But I've got to work with what I'm given.
The underlying statement remains: It really looks like there might
be a bug in Darwin's implementation of last close semantics for
device nodes, which can lead to a driver's close never getting
called.
Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden