mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Removing the thread kill functionality.
Wasn't really used and has potential for trouble.
This commit is contained in:
parent
f73eb3b086
commit
1ca0d970fc
3 changed files with 0 additions and 23 deletions
|
@ -361,12 +361,6 @@ RETSIGTYPE sig_handler(int signo)
|
||||||
set_processing_status("TERMINATING", "sig_handler");
|
set_processing_status("TERMINATING", "sig_handler");
|
||||||
signal_val = signo;
|
signal_val = signo;
|
||||||
|
|
||||||
if ( thread_mgr->Terminating() && (signal_val == SIGTERM || signal_val == SIGINT) )
|
|
||||||
// If the thread manager is already terminating (i.e.,
|
|
||||||
// waiting for child threads to exit), another term signal
|
|
||||||
// will send the threads a kill.
|
|
||||||
thread_mgr->KillThreads();
|
|
||||||
|
|
||||||
return RETSIGVAL;
|
return RETSIGVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,14 +48,6 @@ void Manager::Terminate()
|
||||||
terminating = false;
|
terminating = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::KillThreads()
|
|
||||||
{
|
|
||||||
DBG_LOG(DBG_THREADING, "Killing threads ...");
|
|
||||||
|
|
||||||
for ( all_thread_list::iterator i = all_threads.begin(); i != all_threads.end(); i++ )
|
|
||||||
(*i)->Kill();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Manager::AddThread(BasicThread* thread)
|
void Manager::AddThread(BasicThread* thread)
|
||||||
{
|
{
|
||||||
DBG_LOG(DBG_THREADING, "Adding thread %s ...", thread->Name().c_str());
|
DBG_LOG(DBG_THREADING, "Adding thread %s ...", thread->Name().c_str());
|
||||||
|
|
|
@ -49,15 +49,6 @@ public:
|
||||||
*/
|
*/
|
||||||
bool Terminating() const { return terminating; }
|
bool Terminating() const { return terminating; }
|
||||||
|
|
||||||
/**
|
|
||||||
* Immediately kills all child threads. It does however not yet join
|
|
||||||
* them, one still needs to call Terminate() for that.
|
|
||||||
*
|
|
||||||
* This method is safe to call from a signal handler, and can in fact
|
|
||||||
* be called while Terminate() is already in progress.
|
|
||||||
*/
|
|
||||||
void KillThreads();
|
|
||||||
|
|
||||||
typedef std::list<std::pair<string, MsgThread::Stats> > msg_stats_list;
|
typedef std::list<std::pair<string, MsgThread::Stats> > msg_stats_list;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue