From e214df898068080c65907f0dd1a5d8864e93636e Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 16 May 2014 13:37:23 +0800 Subject: [PATCH] Try using IN_DELETE_SELF with inotify --- fish_tests.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fish_tests.cpp b/fish_tests.cpp index 6cdfafc72..28d6ec55b 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -2409,7 +2409,7 @@ static bool test_basic_inotify_support() } /* Add file to watch list */ - int wd = inotify_add_watch(fd, INOTIFY_TEST_PATH, IN_DELETE); + int wd = inotify_add_watch(fd, INOTIFY_TEST_PATH, IN_DELETE | IN_DELETE_SELF); if (wd < 0) { err(L"inotify_add_watch failed: %s", strerror(errno)); @@ -2437,7 +2437,6 @@ static bool test_basic_inotify_support() if (count == 0 || ! FD_ISSET(fd, &fds)) { inotify_works = false; - err(L"inotify file descriptor not readable. Is inotify busted?"); struct utsname version = {}; uname(&version);