[Gllug] Starting a daemon

Richard W.M. Jones rich at annexia.org
Thu Dec 30 14:35:52 UTC 2010

On Thu, Dec 30, 2010 at 12:54:51PM +0000, t.clarke wrote:
> By the way,  the & results in the background program still being logically
> 'attached' to your terminal.
> I believe if you quit it may possibly 'die' unless nohup is specified - you
> will need to experiment.
> Should you need to completely detach the program from the terminal, so that it
> will independently 'for ever' as a proper daemon, I have a small C program
> which daemonises other programs,  eg:
> daemon  program-name

Isn't this essentially what the setsid(1) program does?


Richard Jones
Red Hat
Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list