-
Couldn't load subscription status.
- Fork 7
Open
Description
I use the current version of code from in_isdir branch on FreeBSD 10.0-RELEASE #0 r260789 amd64 with simple demo software, described below. I found, that libinotify-kqueue works properly during some short time and fails to detect deletion events after that. Even after reboot. I'm not sure, but this problem may be related with pipe creation in watching directory. But this pipe was deleted before next booting. Source code of used tool is based on http://man7.org/tlpi/code/online/dist/inotify/demo_inotify.c.html
#include <sys/inotify.h>
#include <stdio.h>
#include <unistd.h>
#define BUF_LEN (1<<16)
int main(int argc, char *argv[])
{
int fd, wd, numRead;
char buf[BUF_LEN];
fd = inotify_init();
wd = inotify_add_watch(fd, argv[1], IN_ALL_EVENTS);
for (;;)
{
numRead = read(fd, buf, BUF_LEN);
if (numRead > 0)
{
printf("Got something\n");
}
}
return 0;
}
P.S. Sorry for my English
Metadata
Metadata
Assignees
Labels
No labels