mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Use a timer to check for death of supervised node's parent
This commit is contained in:
parent
7ddd311583
commit
dbca14e1fc
6 changed files with 43 additions and 11 deletions
11
src/Net.cc
11
src/Net.cc
|
@ -290,17 +290,6 @@ void net_run()
|
|||
while ( iosource_mgr->Size() ||
|
||||
(BifConst::exit_only_after_terminate && ! terminating) )
|
||||
{
|
||||
// Note: only simple + portable way of detecting loss of parent
|
||||
// process seems to be polling for change in PPID. There's platform
|
||||
// specific ways if we do end up needing something more responsive
|
||||
// and/or have to avoid overhead of polling, but maybe not worth
|
||||
// the additional complexity:
|
||||
// Linux: prctl(PR_SET_PDEATHSIG, ...)
|
||||
// FreeBSD: procctl(PROC_PDEATHSIG_CTL)
|
||||
// TODO: make this a proper timer
|
||||
if ( zeek::supervised_node && zeek::supervised_node->parent_pid != getppid() )
|
||||
zeek_terminate_loop("supervised cluster node was orphaned");
|
||||
|
||||
double ts;
|
||||
iosource::IOSource* src = iosource_mgr->FindSoonest(&ts);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue