On Tue, 2002-06-11 at 06:45, Poul-Henning Kamp wrote:
> >The idea is simple: the same device(major,minor) can
> >be opened several times by different processes (or
> >possibly threads within the same process) and each
> >process (thread) will have unique device instance. 
> 
> Sorry, but this wont work for a large number of reasons.
> 
> For one thing none of the  dup(2) or fork(2) like systemcalls
> report what happens to the filedescriptors down to the
> device drivers so you have no way to correctly track which
> process or which instance you are working on.

Can't you kludge this by creating /dev/foo0 and when it is opened
replacing it with a different minor number?

Or perhaps /dev/foo0 as a symlink to /dev/foo0.0 and when it is opened
create /dev/foo0.1 and change the symlink.

This is obviously a different major,minor pair but those are the
constraints in the system :)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to