diff options
author | Marc Laukien <marc@zeroc.com> | 2001-08-22 20:52:13 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-08-22 20:52:13 +0000 |
commit | 611da271dc12cc6517267ed8d6d553805cb16d9f (patch) | |
tree | 645a092bd25b17819a688dcb8fa81c897fcc7039 /cpp/src/Ice/Instance.cpp | |
parent | SysLogger (diff) | |
download | ice-611da271dc12cc6517267ed8d6d553805cb16d9f.tar.bz2 ice-611da271dc12cc6517267ed8d6d553805cb16d9f.tar.xz ice-611da271dc12cc6517267ed8d6d553805cb16d9f.zip |
lots of stuff
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index fc0243a6549..0f2ac185da6 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -150,6 +150,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope { string value; + // Must be done before "Ice.Daemon" is checked value = properties->getProperty("Ice.PrintProcessId"); if (atoi(value.c_str()) >= 1) { @@ -161,6 +162,28 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope } #ifndef WIN32 + value = properties->getProperty("Ice.Daemon"); + if (atoi(value.c_str()) >= 1) + { + value = properties->getProperty("Ice.DaemonNoClose"); + int noclose = atoi(value.c_str()); + + value = properties->getProperty("Ice.DaemonNoChdir"); + int nochdir = atoi(value.c_str()); + + if (daemon(nochdir, noclose) == -1) + { + --_globalStateCounter; + if (_globalStateMutex != 0) + { + _globalStateMutex->unlock(); + } + throw SystemException(__FILE__, __LINE__); + } + } +#endif + +#ifndef WIN32 value = properties->getProperty("Ice.UseSyslog"); if (atoi(value.c_str()) >= 1) { |