inotify-map.c: return a copy of a path list in lookup functions.
Becouse it is possible to change the a list stored by the API while traversing it, a bug can couse a infinite loop. lets be strict about this and only return a copy of the list, so it can't be changed by calls to the API.
This commit is contained in:
parent
33ceeca315
commit
440e5ed7d2
4 changed files with 22 additions and 17 deletions
|
|
@ -23,9 +23,9 @@ void inotify_unmap_all();
|
|||
|
||||
int inotify_map_get_wd(const char *path);
|
||||
|
||||
const struct str_list* inotify_map_lookup(int wd);
|
||||
char** inotify_map_lookup(int wd);
|
||||
|
||||
const struct str_list* inotify_map_lookup_by_path(const char *path);
|
||||
char** inotify_map_lookup_by_path(const char *path);
|
||||
|
||||
int inotify_map_isempty();
|
||||
|
||||
|
|
|
|||
Reference in a new issue