1 .\" Copyright (C) 2005 Robert Love
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
6 .\" 2006-02-07 mtk, minor changes
8 .TH INOTIFY_RM_WATCH 2 2021-03-22 "Linux" "Linux Programmer's Manual"
10 inotify_rm_watch \- remove an existing watch from an inotify instance
13 .RI ( libc ", " \-lc )
16 .B #include <sys/inotify.h>
18 .BI "int inotify_rm_watch(int " fd ", int " wd );
19 .\" Before glibc 2.10, the second argument was types as uint32_t.
20 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
23 .BR inotify_rm_watch ()
24 removes the watch associated with the watch descriptor
26 from the inotify instance associated with the file descriptor
29 Removing a watch causes an
31 event to be generated for this watch descriptor.
36 .BR inotify_rm_watch ()
38 On error, \-1 is returned and
40 is set to indicate the error.
45 is not a valid file descriptor.
52 is not an inotify file descriptor.
54 Inotify was merged into the 2.6.13 Linux kernel.
56 This system call is Linux-specific.
58 .BR inotify_add_watch (2),