summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Activator.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-01-24 16:35:10 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-01-24 16:35:10 +0000
commitc0db8e43469e06db713691c0e3b8dd6356223269 (patch)
tree020e68ccccf51205bac673c5c7a15abea73d269c /cpp/src/IceGrid/Activator.cpp
parentfixing up spec file generation and making spec files parameterized (diff)
downloadice-c0db8e43469e06db713691c0e3b8dd6356223269.tar.bz2
ice-c0db8e43469e06db713691c0e3b8dd6356223269.tar.xz
ice-c0db8e43469e06db713691c0e3b8dd6356223269.zip
- Removed reference to RH9 and LinuxThreads from INSTALL.LINUX
- Fixed a bug in the always activation mode which would cause a segfault on shutdown. - Removed the Linux work-around for killing proceses (with killpg). - Processes forked by the activator now have their own process group to ensure they don't receive keyboards signals (SIGINT, SIGQUIT) from the node.
Diffstat (limited to 'cpp/src/IceGrid/Activator.cpp')
-rw-r--r--cpp/src/IceGrid/Activator.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp
index 09045b8f0f8..fb826d0edb5 100644
--- a/cpp/src/IceGrid/Activator.cpp
+++ b/cpp/src/IceGrid/Activator.cpp
@@ -651,13 +651,10 @@ Activator::activate(const string& name,
// Until exec, we can only use async-signal safe functions
//
-#ifdef __linux
//
- // Create a process group for this child, to be able to send
- // a signal to all the thread-processes with killpg
+ // Assign a new process group for this process.
//
- setpgrp();
-#endif
+ setpgid(0, 0);
//
// Close all file descriptors, except for standard input,
@@ -851,6 +848,7 @@ Activator::sendSignal(const string& name, const string& signal)
{
sendSignal(name, stringToSignal(signal));
}
+
void
Activator::sendSignal(const string& name, int signal)
{
@@ -870,12 +868,7 @@ Activator::sendSignal(const string& name, int signal)
return;
}
-#ifdef __linux
- // Use process groups on Linux instead of processes
- int ret = ::killpg(static_cast<pid_t>(pid), signal);
-#else
int ret = ::kill(static_cast<pid_t>(pid), signal);
-#endif
if(ret != 0 && getSystemErrno() != ESRCH)
{
SyscallException ex(__FILE__, __LINE__);