sources from main repository

This commit is contained in:
Guenter Obiltschnig
2006-12-22 09:56:56 +00:00
parent e958c09804
commit 898be6c227
20 changed files with 1091 additions and 69 deletions

View File

@@ -1,7 +1,7 @@
//
// ServerApplication.cpp
//
// $Id: //poco/1.3/Util/src/ServerApplication.cpp#1 $
// $Id: //poco/1.3/Util/src/ServerApplication.cpp#2 $
//
// Library: Util
// Package: Application
@@ -403,14 +403,18 @@ void ServerApplication::waitForTerminationRequest()
int ServerApplication::run(int argc, char** argv)
{
if (isDaemon(argc, argv))
bool runAsDaemon = isDaemon(argc, argv);
if (runAsDaemon)
{
beDaemon();
}
try
{
init(argc, argv);
chdir("/");
if (runAsDaemon)
{
chdir("/");
}
}
catch (Exception& exc)
{