I recently noticed inotify_add_watch() system call always returns 0
(assuming fd1 has a valid descriptor returned by inotify_init() )
if((wd1 = inotify_add_watch(fd1,path1, IN_OPEN | IN_ACCESS | IN_ATTRIB)) < 0) perror("inotify_add_watch failed");
fprintf(stderr, "wd1= %d\n", wd1 );
This piece of code always prints "wd1= 0".
I recently noticed inotify_add_watch() system call always returns 0
(assuming fd1 has a valid descriptor returned by inotify_init() )
if((wd1 = inotify_ add_watch( fd1,path1, IN_OPEN | IN_ACCESS | IN_ATTRIB)) < 0)
perror( "inotify_ add_watch failed");
fprintf(stderr, "wd1= %d\n", wd1 );
This piece of code always prints "wd1= 0".