mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Add btests for supervisor stem/leaf process revival
This commit is contained in:
parent
bbdf5f8938
commit
5fb01caee6
7 changed files with 165 additions and 0 deletions
|
@ -98,3 +98,15 @@ function Supervisor::__is_supervisor%(%): bool
|
|||
%{
|
||||
return val_mgr->GetBool(zeek::supervisor_mgr != nullptr);
|
||||
%}
|
||||
|
||||
function Supervisor::__stem_pid%(%): int
|
||||
%{
|
||||
if ( zeek::supervisor_mgr )
|
||||
return val_mgr->GetInt(zeek::supervisor_mgr->StemPID());
|
||||
|
||||
if ( zeek::Supervisor::ThisNode() )
|
||||
return val_mgr->GetInt(zeek::Supervisor::ThisNode()->parent_pid);
|
||||
|
||||
builtin_error("supervisor mode not enabled and not a supervised node");
|
||||
return val_mgr->GetInt(-1);
|
||||
%}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue