From f8ced47f5cd3d275d6bce771e94a73a94c98f3f1 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 10 Aug 2007 06:01:03 +0000 Subject: [PATCH] reread notify socket when interrupted (EINTR) through sigchild --- src/dumm/mconsole.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dumm/mconsole.c b/src/dumm/mconsole.c index 32c969bac..01547e1f1 100644 --- a/src/dumm/mconsole.c +++ b/src/dumm/mconsole.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -187,7 +188,10 @@ static bool wait_for_notify(private_mconsole_t *this, char *nsock) close(this->notify); return FALSE; } - len = recvfrom(this->notify, ¬ify, sizeof(notify), 0, NULL, 0); + do + { + len = recvfrom(this->notify, ¬ify, sizeof(notify), 0, NULL, 0); + } while (len < 0 && errno == EINTR); if (len < 0 || len >= sizeof(notify)) { DBG1("reading from mconsole notify socket failed: %m");