From af380de3553b78af34655ca1b05f9816e8c3fe21 Mon Sep 17 00:00:00 2001 From: Ondrej Kos Date: Wed, 19 Jun 2013 14:42:40 +0200 Subject: Quit monitor when there's no more processes to stop --- src/monitor/monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 8f1be95a..a763a0f4 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -1195,7 +1195,9 @@ static void monitor_quit(struct mt_ctx *mt_ctx, int ret) if (pid == -1) { /* An error occurred while waiting */ error = errno; - if (error != EINTR) { + if (error == ECHILD) { + killed = true; + } else if (error != EINTR) { DEBUG(0, ("[%d][%s] while waiting for [%s]\n", error, strerror(error), svc->name)); /* Forcibly kill this child */ -- cgit