inotify_rm_watch

Name

inotify_rm_watch -- remove a watch from an inotify watch list

Synopsis

#include <sys/inotify.h>

int inotify_rm_watch(int fd, uint32_t wd);

Description

inotify_rm_watch() shall remove the watch associated with the watch descriptor wd from the watch list of the inotify instance associated with the file descriptor fd.

If a watch is removed, its watch descriptor shall generate the IN_IGNORED event.

Return Value

On success, inotify_rm_watch() shall return 0.

On failure, inotify_rm_watch() shall return -1 and set errno to an appropriate value.

Errors

EBADF 

The file descriptor fd is invalid.

EINVAL 

wd is invalid, or fd is not a valid inotify file descriptor.

See Also

inotify_add_watch(), inotify_init()