diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-09-04 19:23:32 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-09-04 19:23:32 +0000 |
commit | bdeb0007e50f676bf416ca25c493c888548ea7cd (patch) | |
tree | f7f25ecd302b273e31d80a420e5667b40900a267 /cpp/src/IcePack/ActivatorI.cpp | |
parent | Temporary fix to use binary freeze db (diff) | |
download | ice-bdeb0007e50f676bf416ca25c493c888548ea7cd.tar.bz2 ice-bdeb0007e50f676bf416ca25c493c888548ea7cd.tar.xz ice-bdeb0007e50f676bf416ca25c493c888548ea7cd.zip |
Added local exceptions ObjectAdapterActiveException and
ObjectAdapterNotRegisteredException.
:LocatoRegistry::addAdapter method to setAdapterDirectProxy.
Minor IcePack fixes.
Diffstat (limited to 'cpp/src/IcePack/ActivatorI.cpp')
-rw-r--r-- | cpp/src/IcePack/ActivatorI.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/cpp/src/IcePack/ActivatorI.cpp b/cpp/src/IcePack/ActivatorI.cpp index 7628fb8fa7c..3a6fabe53b9 100644 --- a/cpp/src/IcePack/ActivatorI.cpp +++ b/cpp/src/IcePack/ActivatorI.cpp @@ -287,12 +287,20 @@ IcePack::ActivatorI::activate(const ServerPtr& server) void IcePack::ActivatorI::deactivate(const ServerPtr& server) { - pid_t pid = static_cast<pid_t>(server->getPid()); - + Ice::Int pid = server->getPid(); + + if(pid == 0) + { + // + // Server is already deactivated. + // + return; + } + // // Send a SIGTERM to the process. // - if(::kill(pid, SIGTERM)) + if(::kill(static_cast<pid_t>(pid), SIGTERM)) { SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); @@ -309,12 +317,20 @@ IcePack::ActivatorI::deactivate(const ServerPtr& server) void IcePack::ActivatorI::kill(const ServerPtr& server) { - pid_t pid = static_cast<pid_t>(server->getPid()); + Ice::Int pid = server->getPid(); + if(pid == 0) + { + // + // Server is already deactivated. + // + return; + } + // // Send a SIGKILL to the process. // - if(::kill(pid, SIGKILL)) + if(::kill(static_cast<pid_t>(pid), SIGKILL)) { SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); |