Skip to content
Snippets Groups Projects
Commit 8183c6c2 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia Committed by Graeme Stewart
Browse files

Introducing killChildren() (AthenaMPTools-00-02-37-01)

	* Introducing killChildren()
parent cb29e0e7
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,9 @@ class IAthenaMPTool : virtual public IAlgTool
virtual void useFdsRegistry(boost::shared_ptr<AthenaInterprocess::FdsRegistry>) = 0;
virtual void setRandString(const std::string& randStr) = 0;
// Brutal force: kill all children
virtual void killChildren() = 0;
};
#endif
......@@ -16,6 +16,7 @@
#include <unistd.h>
#include <stdio.h>
#include <stdint.h>
#include <signal.h>
#include <iterator>
......@@ -204,6 +205,13 @@ void AthenaMPToolBase::setRandString(const std::string& randStr)
m_randStr = randStr;
}
void AthenaMPToolBase::killChildren()
{
for(auto child : m_processGroup->getChildren()) {
kill(child.getProcessID(),SIGKILL);
}
}
std::unique_ptr<AthenaInterprocess::ScheduledWork> AthenaMPToolBase::operator()(const AthenaInterprocess::ScheduledWork& param)
{
std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork;
......
......@@ -46,6 +46,8 @@ class AthenaMPToolBase : public AthAlgTool
virtual void useFdsRegistry(boost::shared_ptr<AthenaInterprocess::FdsRegistry>);
virtual void setRandString(const std::string& randStr);
virtual void killChildren();
// _________IMessageDecoder_________
std::unique_ptr<AthenaInterprocess::ScheduledWork> operator()(const AthenaInterprocess::ScheduledWork&);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment