[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: writting a Daemon in c



On Wed, 20 Oct 1999, Evan Moore wrote:

> I am writting a Daemon in c, I need to know how to disconnect the program
> from the terminal so that if that terminal is destoyed it will not cause
> my server to shutdown. I have done this with perl scripts, but can't not
> figure it out with c. Thanks in advance

Use fork() to fork your daemon process. Exit the main process and have the
child process perform the daemon functions. The child process will not exit
when the controlling tty is gone.


T


Reply to: