Skip to content

Commit

Permalink
Server: With -daemon, disable standard output
Browse files Browse the repository at this point in the history
The server is headed towards being a background process; for now,
the -daemon option is used when the server is started in background
mode.
  • Loading branch information
skyjake committed Feb 1, 2013
1 parent b007486 commit 9e9574d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions doomsday/client/src/dd_init.cpp
Expand Up @@ -174,6 +174,14 @@ int main(int argc, char** argv)
}
#endif

#ifdef __SERVER__
if(dengApp.commandLine().has("-daemon"))
{
// In server mode, stay quiet on the standard outputs.
LogBuffer_EnableStandardOutput(false);
}
#endif

dengApp.initSubsystems();

Libdeng_Init();
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/dd_pinit.cpp
Expand Up @@ -132,7 +132,7 @@ void DD_ConsoleInit(void)
Str_Init(&nativePath); Str_Set(&nativePath, outFileName);
F_ToNativeSlashes(&nativePath, &nativePath);

// We'll redirect stdout to a log file.
// We'll redirect log output to a file.
outFileOk = LegacyCore_SetLogFile(Str_Text(&nativePath));
Str_Free(&nativePath);

Expand Down

0 comments on commit 9e9574d

Please sign in to comment.