summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-09-18 20:01:11 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-09-18 20:01:11 +0000
commitaa712ab96c9d6a9ae7dcea6b4907de46a4ee09a5 (patch)
treee6d52c0dfec4c9d8ca284a965db6cf3bf04b052e /cpp/src
parentfixes (diff)
downloadice-aa712ab96c9d6a9ae7dcea6b4907de46a4ee09a5.tar.bz2
ice-aa712ab96c9d6a9ae7dcea6b4907de46a4ee09a5.tar.xz
ice-aa712ab96c9d6a9ae7dcea6b4907de46a4ee09a5.zip
Changed tracing level for server adapters. Fixed parser bug. Fix activation
bug (race condition).
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IcePack/ActivatorI.cpp6
-rw-r--r--cpp/src/IcePack/Parser.cpp2
-rw-r--r--cpp/src/IcePack/ServerAdapterI.cpp8
3 files changed, 9 insertions, 7 deletions
diff --git a/cpp/src/IcePack/ActivatorI.cpp b/cpp/src/IcePack/ActivatorI.cpp
index 77bb18c6736..0e2a056ee9b 100644
--- a/cpp/src/IcePack/ActivatorI.cpp
+++ b/cpp/src/IcePack/ActivatorI.cpp
@@ -303,7 +303,8 @@ IcePack::ActivatorI::deactivate(const ServerPtr& server)
//
// Send a SIGTERM to the process.
//
- if(::kill(static_cast<pid_t>(pid), SIGTERM))
+ int ret = ::kill(static_cast<pid_t>(pid), SIGTERM);
+ if(ret != 0 && ret != ESRCH)
{
SyscallException ex(__FILE__, __LINE__);
ex.error = getSystemErrno();
@@ -333,7 +334,8 @@ IcePack::ActivatorI::kill(const ServerPtr& server)
//
// Send a SIGKILL to the process.
//
- if(::kill(static_cast<pid_t>(pid), SIGKILL))
+ int ret = ::kill(static_cast<pid_t>(pid), SIGKILL);
+ if(ret != 0 && ret != ESRCH)
{
SyscallException ex(__FILE__, __LINE__);
ex.error = getSystemErrno();
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp
index ccea0a4f0b5..4831be1a1f0 100644
--- a/cpp/src/IcePack/Parser.cpp
+++ b/cpp/src/IcePack/Parser.cpp
@@ -340,7 +340,7 @@ IcePack::Parser::describeServer(const list<string>& args)
cout << "node = " << desc.node << endl;
cout << "path = " << desc.path << endl;
cout << "pwd = " << desc.pwd << endl;
- cout << "activation = " << (desc.activation == OnDemand ? "on-demand" : "manual");
+ cout << "activation = " << (desc.activation == OnDemand ? "on-demand" : "manual") << endl;
cout << "args = ";
copy(desc.theArgs.begin(), desc.theArgs.end(), ostream_iterator<string>(cout," "));
cout << endl;
diff --git a/cpp/src/IcePack/ServerAdapterI.cpp b/cpp/src/IcePack/ServerAdapterI.cpp
index 0ae0c8f2f03..a64a35cfb43 100644
--- a/cpp/src/IcePack/ServerAdapterI.cpp
+++ b/cpp/src/IcePack/ServerAdapterI.cpp
@@ -40,7 +40,7 @@ IcePack::ServerAdapterI::getDirectProxy(bool activate, const Ice::Current& curre
// be changed.
//
- if(_traceLevels->adapter > 2)
+ if(_traceLevels->adapter > 1)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
out << "waiting for activation of server adapter `" << name << "'";
@@ -57,7 +57,7 @@ IcePack::ServerAdapterI::getDirectProxy(bool activate, const Ice::Current& curre
bool notify = timedWait(IceUtil::Time::seconds(_waitTime));
if(!notify)
{
- if(_traceLevels->adapter > 1)
+ if(_traceLevels->adapter > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
out << "server adapter `" << name << "' activation timed out";
@@ -67,7 +67,7 @@ IcePack::ServerAdapterI::getDirectProxy(bool activate, const Ice::Current& curre
}
else
{
- if(_traceLevels->adapter > 1)
+ if(_traceLevels->adapter > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
out << "server adapter `" << name << "' activation failed, couldn't start the server";
@@ -110,7 +110,7 @@ IcePack::ServerAdapterI::setDirectProxy(const Ice::ObjectPrx& prx, const Ice::Cu
_proxy = prx;
_notified = true;
- if(_traceLevels->adapter > 1)
+ if(_traceLevels->adapter > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
out << "server adapter `" << name << "' " << (_proxy ? "activated" : "deactivated");