mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Check for non-negative watch object in inotify_add_watch
This commit is contained in:
parent
73cbb0c65f
commit
a0bf841be2
1 changed files with 5 additions and 1 deletions
|
@ -2407,8 +2407,12 @@ static bool test_basic_inotify_support()
|
|||
err(L"touch failed");
|
||||
}
|
||||
|
||||
/* add file to watch list */
|
||||
/* Add file to watch list */
|
||||
int wd = inotify_add_watch(fd, INOTIFY_TEST_PATH, IN_DELETE);
|
||||
if (wd < 0)
|
||||
{
|
||||
err(L"inotify_add_watch failed: %s", strerror(errno));
|
||||
}
|
||||
|
||||
/* Delete file */
|
||||
if (system("rm " INOTIFY_TEST_PATH))
|
||||
|
|
Loading…
Reference in a new issue