Changeset 2110
- Timestamp:
- 13/03/2008 21:48:05 (10 months ago)
- Files:
-
- 1 modified
-
box/trunk/lib/server/Daemon.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/server/Daemon.cpp
r2103 r2110 53 53 mSingleProcess(false), 54 54 mRunInForeground(false), 55 #ifdef WIN32 56 mKeepConsoleOpenAfterFork(true), 57 #else 55 58 mKeepConsoleOpenAfterFork(false), 59 #endif 56 60 mHaveConfigFile(false), 57 61 mAppName(DaemonName()) … … 104 108 { 105 109 return "c:" 106 #ifndef WIN32 110 #ifdef WIN32 111 "K" 112 #else // !WIN32 107 113 "DFkP" 108 114 #endif … … 121 127 " argument is the configuration file, or else the default \n" 122 128 " [" << GetConfigFileName() << "]\n" 123 #ifndef WIN32 129 #ifdef WIN32 130 " -K Stop writing log messages to console while daemon is running\n" 131 #else // !WIN32 124 132 " -D Debugging mode, do not fork, one process only, one client only\n" 125 133 " -F Do not fork into background, but fork to serve multiple clients\n" … … 157 165 break; 158 166 159 #ifndef WIN32 167 #ifdef WIN32 168 case 'K': 169 { 170 mKeepConsoleOpenAfterFork = false; 171 } 172 break; 173 #else // !WIN32 160 174 case 'D': 161 175 { … … 491 505 #endif // !WIN32 492 506 493 // Log the start message494 BOX_NOTICE("Starting daemon, version " << BOX_VERSION495 << ", config: " << mConfigFileName);496 497 507 // Write PID to file 498 508 char pid[32]; … … 519 529 #endif // BOX_MEMORY_LEAK_TESTING 520 530 521 if(asDaemon && !mKeepConsoleOpenAfterFork) 531 if( 532 #ifndef WIN32 533 asDaemon && 534 #endif 535 !mKeepConsoleOpenAfterFork) 522 536 { 523 537 #ifndef WIN32 … … 546 560 // -- this has in the past sent text to something which isn't expecting it. 547 561 TRACE_TO_STDOUT(false); 562 #endif // ! WIN32 548 563 Logging::ToConsole(false); 549 #endif // ! WIN32550 564 } 565 566 // Log the start message 567 BOX_NOTICE("Starting daemon, version: " << BOX_VERSION); 568 BOX_NOTICE("Using configuration file: " << mConfigFileName); 551 569 } 552 570 catch(BoxException &e)
