In message <[EMAIL PROTECTED]>, Maksim Yevmenk in writes: >Hackers, > >The project i'm working on might require some sort of >device cloning. The current way of cloning, i.e. use >DEVFS and allocate unique minor numbers, is not very >good for my purpose. > >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. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message