From f9024c71864d9198e47aa02109fa8c78f91e30fd Mon Sep 17 00:00:00 2001 From: dmz-uk Date: Thu, 22 Dec 2016 17:52:21 +0000 Subject: [PATCH] Prevent child from calling exit() on interrupt A proposed fix for the logrotate SIGHUP issue. --- src/child.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/child.c b/src/child.c index 2c4dc22..effb2ae 100644 --- a/src/child.c +++ b/src/child.c @@ -233,6 +233,9 @@ static void child_main (struct child_s *ptr) ret = select(maxfd + 1, &rfds, NULL, NULL, NULL); if (ret == -1) { + if (errno == EINTR) { + continue; + } log_message (LOG_ERR, "error calling select: %s", strerror(errno)); exit(1);