mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Move ParentProcessCheckTimer to detail namespace
This commit is contained in:
parent
7f347a3b1e
commit
d00b3a8daa
3 changed files with 6 additions and 3 deletions
|
@ -38,7 +38,7 @@ int main(int argc, char** argv)
|
|||
#endif
|
||||
|
||||
if ( zeek::Supervisor::ThisNode() )
|
||||
timer_mgr->Add(new zeek::ParentProcessCheckTimer(1, 1));
|
||||
timer_mgr->Add(new zeek::detail::ParentProcessCheckTimer(1, 1));
|
||||
|
||||
double time_net_start = current_time(true);;
|
||||
|
||||
|
|
|
@ -140,12 +140,13 @@ static std::string make_create_message(const Supervisor::NodeConfig& node)
|
|||
return fmt("create %s %s", node.name.data(), json_str.data());
|
||||
}
|
||||
|
||||
ParentProcessCheckTimer::ParentProcessCheckTimer(double t, double arg_interval)
|
||||
zeek::detail::ParentProcessCheckTimer::ParentProcessCheckTimer(double t,
|
||||
double arg_interval)
|
||||
: Timer(t, TIMER_PPID_CHECK), interval(arg_interval)
|
||||
{
|
||||
}
|
||||
|
||||
void ParentProcessCheckTimer::Dispatch(double t, bool is_expire)
|
||||
void zeek::detail::ParentProcessCheckTimer::Dispatch(double t, bool is_expire)
|
||||
{
|
||||
// Note: only simple + portable way of detecting loss of parent
|
||||
// process seems to be polling for change in PPID. There's platform
|
||||
|
|
|
@ -389,6 +389,7 @@ private:
|
|||
std::string msg_buffer;
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
/**
|
||||
* A timer used by supervised processes to periodically check whether their
|
||||
* parent (supervisor) process has died. If it has died, the supervised
|
||||
|
@ -410,6 +411,7 @@ protected:
|
|||
|
||||
double interval;
|
||||
};
|
||||
}
|
||||
|
||||
extern Supervisor* supervisor_mgr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue