how do i write a daemon? I know what they are (little programs that do something
useful in the background), but are they just normal programs that get pushed
into the background?

how do i make one (e.g foobar) and have it so that it runs in the background
if you type 'foobar -D' (or something).
I have a feeling it has something to do with fork() but how? For a fork() to
work you need a parent process and a child don't you?

and how do i monitor a /dev/TTYS? device so that when my modem picks up
the line and connects to a remote computer my daemon does something, then
when the modem puts down the line the daemon does something else?

last 'how do i' :)...
how do i get the PID of my program? Oh, found it... getpid() (quite amazingly :)

-- 
+++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++
[EMAIL PROTECTED]                    http://x-map.home.ml.org

Reply via email to