On Tue, Aug 20, 2002 at 02:59:45AM -0400, Jonathan Khoo wrote: > Hi guys, > > Is it possible for the kernel to push data to the userspace via ioctl > calls? What I have in mind is for a program in the userspace to open an > ioctl call to a module, the module is responsible for collecting data > and whenever there is new updates, the module will push the data to the > userspace. Mmmh, if I understand correctly, the asynchronous notification mechanism does exactly what you want to do. A userspace program registers itself to enable notification from an input file; the kernel is responsible for sending a SIGIO signal to registered programs whenever new data is available from that input file; the program handles the signal and does what it has to do. For a detailed description, see: http://www.xml.com/ldd/chapter/book/ch05.html#t4 There are many examples of drivers that use this mechanism, see for example: $(linux)/drivers/char/busmouse.c HTH, Marco -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/