From: Philip Homburg Date: Wed, 15 Aug 2007 12:50:24 +0000 (+0000) Subject: Close UDP socket after error. X-Git-Tag: v3.1.4~330 X-Git-Url: http://zhaoyanbai.com/repos/%22/xml/v3/zones/static/man.7.txt?a=commitdiff_plain;h=c26de9f435d3596be1ef639769367237847b4ebb;p=minix.git Close UDP socket after error. --- diff --git a/commands/syslogd/syslogd.c b/commands/syslogd/syslogd.c index 4225e17e2..bf2b27c84 100644 --- a/commands/syslogd/syslogd.c +++ b/commands/syslogd/syslogd.c @@ -900,7 +900,11 @@ int main(int argc, char **argv) } else if (len < 0) { /* Got an error or signal while reading */ if (errno != EINTR) /* */ + { logerror("Receive error from UDP channel"); + close(nfd); + nfd= -1; + } } else { /* (len == 0) Channel has been closed */ logerror("UDP channel has closed");