To add to this, the close calls can be forces; there is a flag
in the device structure wich can force notification. I'm not
sure what it does over a fork(), though: I think you really want
open notification.
You mean that when I register my device/kernel module, I can
explicitely
Hello,
Luigi Rizzo wrote:
you could do something like this:
+ open allocates a descriptor which stores the PID of the process requesting
access to the "device"
doing that now
+ each I/O operation uses the descriptor matching the PID passed to the
read/write/ioctl
that too
+ you
when a process closes the device, I do not get a "close" call for each
process closing the device. I instead get a close only on the last
process closing the device.
the reason for this is that you might have a process fork() after
it has opened the device, and you do not want to get to
If I understand you correctly, you have multiple processes all of which
are going to try to open /dev/foo, and you want them to behave as though
they have each opened a unique device?
You can't do this with FreeBSD, or with many other Unixes.
Any SVR4 system can support this. So can
Terry Lambert wrote:
If I understand you correctly, you have multiple processes all of which
are going to try to open /dev/foo, and you want them to behave as though
they have each opened a unique device?
You can't do this with FreeBSD, or with many other Unixes.
Any SVR4 system
Terry Lambert wrote:
when a process closes the device, I do not get a "close" call for each
process closing the device. I instead get a close only on the last
process closing the device.
devices in a similar way as the one is used for scanning pty's).
To add to this, the close
Julian Elischer wrote:
the problem here can be solved by using Poul's 'cloning device'
interface in the driver.
I don't think he has it quite completed but it is partly there.. maybe
enough..
this seems very promising. Any pointers toward more info on this ?
Thanks
bruno
only in
Hello everybody,
I am writing a pseudo-device driver (as a kernel module) that needs to
be opened in write mode by several processes. The problem I am having is
that I do get all the "open" calls when a process opens the device, and
I am able to process data written, etc. on a per-process basis;
when a process closes the device, I do not get a "close" call for each
process closing the device. I instead get a close only on the last
process closing the device.
the reason for this is that you might have a process fork() after
it has opened the device, and you do not want to get to the
Hi,
The reason I am doing this, is precisely because I need to virtualize accesses
from several processes to _one_ _predefined_ device. I have no control over that
device name from the client process point of view, so I can not have multiple
devices. I pretty much need to be able to lie to the
The reason I am doing this, is precisely because I need to virtualize
accesses from several processes to _one_ _predefined_ device. I have no
control over that device name from the client process point of view, so I
can not have multiple devices. I pretty much need to be able to lie to
Hi,
The reason I am doing this, is precisely because I need to virtualize accesses
from several processes to _one_ _predefined_ device. I have no control over that
device name from the client process point of view, so I can not have multiple
devices. I pretty much need to be able to lie
12 matches
Mail list logo