summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordmz-uk <dmz-uk@users.noreply.github.com>2016-12-22 17:52:21 +0000
committerDavid Zambonini <github-bf2@deemzed.uk>2016-12-30 10:16:19 +0000
commitf9024c71864d9198e47aa02109fa8c78f91e30fd (patch)
tree718f025aa4b846cf34c2223da1794079d5895f26
parent90df51093209b33629d939d1e1f4fcc9a40a8124 (diff)
Prevent child from calling exit() on interrupt
A proposed fix for the logrotate SIGHUP issue.
-rw-r--r--src/child.c3
1 files changed, 3 insertions, 0 deletions
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);