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
>
> Evan.
>
man daemon
DAEMON(3) Linux Programmer's Manual DAEMON(3)
NAME
daemon - run in the background
SYNOPSIS
#include <unistd.h>
int daemon (int nochdir, int noclose);
DESCRIPTION
The daemon() function is for programs wishing to detach
themselves from the controlling terminal and run in the
background as system daemons.
....
that's from potato
OK
Reply to: