diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2018-07-19 10:28:15 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2018-07-24 09:13:36 +0000 |
commit | 0fccdd078696e0eb92cf6d91764a01e3e4d20b7b (patch) | |
tree | 81065b7d496c6f67535a013dc6fa864eedb12fc9 /configd | |
parent | 5e09a340eb2571ef9c9a5d7df7b38838821cd697 (diff) |
busy looping is bad
Diffstat (limited to 'configd')
-rw-r--r-- | configd/src/apps/sentinel/config-handler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configd/src/apps/sentinel/config-handler.cpp b/configd/src/apps/sentinel/config-handler.cpp index 67216954f51..325de3c232c 100644 --- a/configd/src/apps/sentinel/config-handler.cpp +++ b/configd/src/apps/sentinel/config-handler.cpp @@ -133,6 +133,9 @@ ConfigHandler::terminate() for (int retry = 0; retry < 10 && doWork(); ++retry) { LOG(warning, "some services refuse to terminate cleanly, sending KILL"); terminateServices(false, true); + tv.tv_sec = 0; + tv.tv_usec = 200000; + select(0, nullptr, nullptr, nullptr, &tv); } return !doWork(); } |