changeset 5935:9160d4bd8c0b HEAD

Don't prevent io_add_notify() from listening for files, since kqueue supports it.
author Timo Sirainen <tss@iki.fi>
date Mon, 09 Jul 2007 06:44:44 +0300
parents 181aa61c182a
children 2133c966701a
files src/lib/ioloop-notify-kqueue.c
diffstat 1 files changed, 0 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/ioloop-notify-kqueue.c	Mon Jul 09 05:47:48 2007 +0300
+++ b/src/lib/ioloop-notify-kqueue.c	Mon Jul 09 06:44:44 2007 +0300
@@ -113,7 +113,6 @@
 	struct kevent ev;
 	struct io_notify *io;
 	int fd;
-	struct stat sb;
 
 	if (ctx == NULL)
 		ctx = io_loop_notify_handler_init();
@@ -124,16 +123,6 @@
 			i_error("open(%s) for kq notify failed: %m", path);
 		return NULL;
 	}
-
-	if (fstat(fd, &sb) < 0) {
-		i_error("fstat(%d, %s) for kq notify failed: %m", fd, path);
-		(void)close(fd);
-		return NULL;
-	}
-	if (!S_ISDIR(sb.st_mode)) {
-		(void)close(fd);
-		return NULL;
-	}
 	fd_close_on_exec(fd, TRUE);
 
 	io = i_new(struct io_notify, 1);