now winix can demonize itself
parameter in the config: demonize (default: true) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@669 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -68,7 +68,7 @@ int main(int argv, char ** argc)
|
||||
if( !app.config.ReadConfig(true, false) ) /* errors to stdout, stdout in not closed */
|
||||
return 2;
|
||||
|
||||
if( app.stdout_is_closed )
|
||||
if( app.stdout_is_closed || app.config.demonize )
|
||||
app.config.log_stdout = false;
|
||||
|
||||
// closing descriptors only at the beginning
|
||||
@@ -90,6 +90,9 @@ int main(int argv, char ** argc)
|
||||
|
||||
app.LogUserGroups();
|
||||
|
||||
if( app.config.demonize && !app.Demonize() )
|
||||
return 4;
|
||||
|
||||
// app.config.base_server can be changed (stripped from 'http://' or a last slash)
|
||||
// it is done when the config is read
|
||||
log << log3 << "base_server: " << app.config.base_server << logend;
|
||||
|
||||
Reference in New Issue
Block a user