+ if (fcntl (inotify_fd, F_SETFL, O_NONBLOCK) == -1) {
+ reply_with_perror ("fcntl: O_NONBLOCK");
+ close (inotify_fd);
+ inotify_fd = -1;
+ return -1;
+ }
+ if (fcntl (inotify_fd, F_SETFD, FD_CLOEXEC) == -1) {
+ reply_with_perror ("fcntl: FD_CLOEXEC");
+ close (inotify_fd);
+ inotify_fd = -1;
+ return -1;
+ }
+#endif