Re: How to "deamonize" ?
From: Pete Brett (pbrett_at_quaNlOitrSoPlAcMorp.com)
Date: 06/24/04
- Next message: Joerg Schmitz-Linneweber: "Re: serial: flushing device buffer - am I close?"
- Previous message: Robert Harris: "Re: serial: flushing device buffer - am I close?"
- In reply to: Martin Blume: "Re: How to "deamonize" ?"
- Next in thread: Fabien R: "Re: How to "deamonize" ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Jun 2004 08:46:23 GMT
"Martin Blume" <mblume@socha.net> wrote:
>"Franki" schrieb
>>
>> (running config : slackware with a 2.4.26 kernel )
>> I have a http server which run normally (a fork which accept
>> connections) . But I would like
>> to change the behaviour of my server (I would like to
>> daemonize it ) :
>
>man daemon
daemon() is not always available... and in any case, it gives less control.
If you just want to run in the background, you can fork() and have the parent
exit. The example code shown in Stevens does various other things like closing
stdin, stdout and stderror, chdir to "/" and ensuring that the daemon process is
not associated with a process group which could receive a HUP signal on modem
hangup etc.
Pete
- Next message: Joerg Schmitz-Linneweber: "Re: serial: flushing device buffer - am I close?"
- Previous message: Robert Harris: "Re: serial: flushing device buffer - am I close?"
- In reply to: Martin Blume: "Re: How to "deamonize" ?"
- Next in thread: Fabien R: "Re: How to "deamonize" ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|