Add monitoring support via kqueue(2). Based on patch from FreeBSD ports, authored by wg@FreeBSD.org and se@FreeBSD.org. However, this version doesn't create any thread, it uses main event dispatcher.
Some effort was made to unify monitoring via kqueue and via inotify APIs. Now both provide their implementation of add_watch() function. I guess there are some logical bugs in vnode_process(). With this commit it would be better provide code as is, and resolve bugs separately.
This commit is contained in:
committed by
Justin Maggard
parent
184607cb56
commit
5e320f2798
10
monitor.h
10
monitor.h
@ -1,8 +1,18 @@
|
||||
int monitor_insert_file(const char *name, const char *path);
|
||||
int monitor_insert_directory(int fd, char *name, const char * path);
|
||||
int monitor_remove_file(const char * path);
|
||||
int monitor_remove_directory(int fd, const char * path);
|
||||
|
||||
#if defined(HAVE_INOTIFY) && defined(HAVE_KQUEUE)
|
||||
#define HAVE_WATCH 1
|
||||
int add_watch(int, const char *);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_INOTIFY
|
||||
void *
|
||||
start_inotify();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KQUEUE
|
||||
void kqueue_monitor_start();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user