Set close-on-exec flag on inotify file descriptor