]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/inotify_rm_watch.2
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man2 / inotify_rm_watch.2
1 .\" Copyright (C) 2005 Robert Love
2 .\"
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
4 .\"
5 .\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
6 .\" 2006-02-07 mtk, minor changes
7 .\"
8 .TH INOTIFY_RM_WATCH 2 2021-03-22 "Linux man-pages (unreleased)"
9 .SH NAME
10 inotify_rm_watch \- remove an existing watch from an inotify instance
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc ", " \-lc )
14 .SH SYNOPSIS
15 .nf
16 .B #include <sys/inotify.h>
17 .PP
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
21 .fi
22 .SH DESCRIPTION
23 .BR inotify_rm_watch ()
24 removes the watch associated with the watch descriptor
25 .I wd
26 from the inotify instance associated with the file descriptor
27 .IR fd .
28 .PP
29 Removing a watch causes an
30 .B IN_IGNORED
31 event to be generated for this watch descriptor.
32 (See
33 .BR inotify (7).)
34 .SH RETURN VALUE
35 On success,
36 .BR inotify_rm_watch ()
37 returns zero.
38 On error, \-1 is returned and
39 .I errno
40 is set to indicate the error.
41 .SH ERRORS
42 .TP
43 .B EBADF
44 .I fd
45 is not a valid file descriptor.
46 .TP
47 .B EINVAL
48 The watch descriptor
49 .I wd
50 is not valid; or
51 .I fd
52 is not an inotify file descriptor.
53 .SH VERSIONS
54 Inotify was merged into the 2.6.13 Linux kernel.
55 .SH STANDARDS
56 This system call is Linux-specific.
57 .SH SEE ALSO
58 .BR inotify_add_watch (2),
59 .BR inotify_init (2),
60 .BR inotify (7)