Index: trunk/src/sh_inotify.c
===================================================================
--- trunk/src/sh_inotify.c	(revision 265)
+++ trunk/src/sh_inotify.c	(revision 268)
@@ -147,6 +147,6 @@
 	  long sflags;
 
-	  sflags = retry_fcntl(FIL__, __LINE__, fd, F_GETFD, 0);
-	  retry_fcntl(FIL__, __LINE__, fd, F_SETFD, sflags|FD_CLOEXEC);
+	  sflags = retry_fcntl(FIL__, __LINE__, ifd, F_GETFD, 0);
+	  retry_fcntl(FIL__, __LINE__, ifd, F_SETFD, sflags|FD_CLOEXEC);
 	}
 #endif
