Start of man-pages-5.14: updating Changes and Changes.old
[man-pages.git] / man2 / inotify_rm_watch.2
blobbbb7d99e3d96a98769adbfdb26b39d48a8d97b28
1 .\" Copyright (C) 2005 Robert Love
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
25 .\" 2006-02-07 mtk, minor changes
26 .\"
27 .TH INOTIFY_RM_WATCH 2 2021-03-22 "Linux" "Linux Programmer's Manual"
28 .SH NAME
29 inotify_rm_watch \- remove an existing watch from an inotify instance
30 .SH SYNOPSIS
31 .nf
32 .B #include <sys/inotify.h>
33 .PP
34 .BI "int inotify_rm_watch(int " fd ", int " wd );
35 .\" Before glibc 2.10, the second argument was types as uint32_t.
36 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
37 .fi
38 .SH DESCRIPTION
39 .BR inotify_rm_watch ()
40 removes the watch associated with the watch descriptor
41 .I wd
42 from the inotify instance associated with the file descriptor
43 .IR fd .
44 .PP
45 Removing a watch causes an
46 .B IN_IGNORED
47 event to be generated for this watch descriptor.
48 (See
49 .BR inotify (7).)
50 .SH RETURN VALUE
51 On success,
52 .BR inotify_rm_watch ()
53 returns zero.
54 On error, \-1 is returned and
55 .I errno
56 is set to indicate the error.
57 .SH ERRORS
58 .TP
59 .B EBADF
60 .I fd
61 is not a valid file descriptor.
62 .TP
63 .B EINVAL
64 The watch descriptor
65 .I wd
66 is not valid; or
67 .I fd
68 is not an inotify file descriptor.
69 .SH VERSIONS
70 Inotify was merged into the 2.6.13 Linux kernel.
71 .SH CONFORMING TO
72 This system call is Linux-specific.
73 .SH SEE ALSO
74 .BR inotify_add_watch (2),
75 .BR inotify_init (2),
76 .BR inotify (7)