There is a good template source code for daemon,
ftp://ftp.uu.net/published/books/stevens.*.z. A good book on TCP/IP programming by
Steven.

James wrote:

> 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?

Reply via email to