Hi cam: Interesting problem. I found this for starting a program in userspace from kernel space: http://lists.cplug.org/pipermail/cplug/2004-April/000101.html I haven't tried it though. Maybe you can start your daemon like this and use signals to talk from user-space to kernel-space and /proc/whatever as an interface to communicate between kernel space and user space? I am learning too, so correct me people if I am wrong. Just my thoughts, Shaks On Tue, 10 Aug 2004 03:52:05 -0700 (PDT), cam <camccuk@xxxxxxxxx> wrote: > Hello all, > > I realise that this question is perhaps similar to the 'Communicating from > userspace to kernel' thread but I'd like some more specific advice. We are > trying to get a kernel module to stop and start a userspace daemon and we're > not sure of the best way to go about it. Here are the options we can think of: > > - use a /proc/sys entry where we can un/set a flag. We would then periodically > poll this value from the userspace daemon and react accordingly. We assume we > would have to use a timer to do this and it seems slightly inefficient to us. > > - would it be possible to use a signal? Here we would have a SIGUSR handler in > the daemon. But we're not sure if a kernel module can send signals to userspace > processes. Anyway, we would have to read the pidfile from the kernel mod and > this might not be a great design decision. > > - I believe we could write a syscall but we're a bit scared of going down this > route and not very experienced in kernel development. Can anyone recommend some > good books/docs on this? There are a lot of tutorials on the net but, frankly, > a lot do not go into much depth. (Although I appreciate them, I'm a bit sick of > the Linux Magazine-type, two-page tutorials which give you a high-level > overview but stop just where things get tricky) > > Any further input into the above ideas or radically new suggestions would be > welcome as well as any recommendations for good kernel books. > > (The Rubini book is good but obviously focused on devices. Linux Application > Development is also good but a bit thin on kernel issues, naturally. Any other > good ones?) > > Cheers, > cam -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/