Corrected a bug regarding select and signal receiving.
authorviric@llimona
Mon, 15 May 2006 17:29:03 +0200
changeset 41 fc273c0e8250
parent 40 8c781743e0d0
child 42 95f305aef8e3
Corrected a bug regarding select and signal receiving. The fd_set is set to zero if select() returns -1.
syslog_in_unix.c
--- a/syslog_in_unix.c	Mon May 15 17:07:58 2006 +0200
+++ b/syslog_in_unix.c	Mon May 15 17:29:03 2006 +0200
@@ -96,6 +96,8 @@
 		read_timeout.tv_usec = 0;
 		result = select(socket_unix+1, &read_fd_set, NULL, NULL,
 				&read_timeout);
+		if (result == -1)
+			FD_ZERO(&read_fd_set);
 		assert( !(result == -1 && errno != EINTR) );
 	}