diff --git a/method_executor.rb b/method_executor.rb index b800683..f7becd0 100644 --- a/method_executor.rb +++ b/method_executor.rb @@ -90,7 +90,8 @@ class MethodExecutor while true sleep 0.5 begin - proc_status = Process.waitpid2(pid, Process::WNOHANG) + SystemdNotifier.notify("WATCHDOG=1") + proc_status = Process.waitpid2(pid, Process::WNOHANG) if proc_status # 子进程已退出,返回 [pid, status] _, status = proc_status elapsed = (Time.now - tick_beg).round(2)