Re: Help on Kernel-Application Programme Communication

Arjan van de Ven (arjan@fenrus.demon.nl)
Mon, 3 Jan 2000 15:03:57 +0100 (CET)


In article <38709EBB.10768@mta6> you wrote:
> The difficulty comes when I want the kernel wants to communicate
> with the daemon. I don't know how to implement this. Maybe it is a
> bad idea.But how can I? I'd really appreciate any assistance--I have
> been thinking on it for such a long time.

There are several ways to do this, but you will be in trouble if it has to
be done from interrupt-context.

[random order]

1) Build a characterdevice, the daemon does a blocking read and writes the
result.
2) 1) but instead of a device, use a file in /proc
3) Implement a new syscall
4) Open a TCP/IP connection to/from your daemon (localhost)
5) Open a named pipe to/from your daemon
6) Send signals to eachother

I think that from interrupt-context, 6) is the only way to go for sending
the "new" route. Returning the value is always process-context, so any of
the above can be used.

Greetings,
Arjan van de Ven

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/