Fix tsyslogd, which reads from stdin, exit on EOF

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-10-24 10:49:57 +02:00
parent 56ff4eedbe
commit a8060d0ad1

View File

@ -1227,11 +1227,12 @@ int main(int argc, char *argv[])
if (i > 0) { if (i > 0) {
printchopped(LocalHostName, line, i + 1, fileno(stdin)); printchopped(LocalHostName, line, i + 1, fileno(stdin));
} else if (i < 0) { } else if (i < 0) {
if (errno != EINTR) { if (errno != EINTR)
logerror("stdin"); logerror("stdin");
} } else {
} logit("EOF\n");
FD_CLR(fileno(stdin), &readfds); exit(0);
}
} }
#endif #endif