Prevent child from calling exit() on interrupt

A proposed fix for the logrotate SIGHUP issue.
This commit is contained in:
dmz-uk authored and David Zambonini committed 2016-12-30 10:16:19 +00:00
1 parent 90df510932
commit f9024c7186
1 file changed
+3
+3
View File
@@ -233,6 +233,9 @@ static void child_main (struct child_s *ptr)
ret = select(maxfd + 1, &rfds, NULL, NULL, NULL); ret = select(maxfd + 1, &rfds, NULL, NULL, NULL);
if (ret == -1) { if (ret == -1) {
if (errno == EINTR) {
continue;
}
log_message (LOG_ERR, "error calling select: %s", log_message (LOG_ERR, "error calling select: %s",
strerror(errno)); strerror(errno));
exit(1); exit(1);