Commit 066e9fe8 by Christian Brauner Committed by GitHub

Merge pull request #1662 from 0x0916/2017-07-01/lxc-monitor-quit

lxc-monitord: exit when got a quit command
parents 86ccab2e 267bc7ed
...@@ -430,10 +430,18 @@ int main(int argc, char *argv[]) ...@@ -430,10 +430,18 @@ int main(int argc, char *argv[])
getpid(), mon.lxcpath); getpid(), mon.lxcpath);
for (;;) { for (;;) {
ret = lxc_mainloop(&mon.descr, 1000 * 30); ret = lxc_mainloop(&mon.descr, 1000 * 30);
if (ret) {
ERROR("mainloop returned an error");
break;
}
if (mon.clientfds_cnt <= 0) { if (mon.clientfds_cnt <= 0) {
NOTICE("No remaining clients. lxc-monitord is exiting."); NOTICE("No remaining clients. lxc-monitord is exiting.");
break; break;
} }
if (quit == 1) {
NOTICE("got quit command. lxc-monitord is exitting.");
break;
}
} }
on_signal: on_signal:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment