OSDN Git Service

08e44b811eb20269ffb54c9d95599ccca831ed56
[linuxjm/LDP_man-pages.git] / original / man2 / inotify_rm_watch.2
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 2010-10-15 "Linux" "Linux Programmer's Manual"
28 .SH NAME
29 inotify_rm_watch \- remove an existing watch from an inotify instance
30 .SH SYNOPSIS
31 .B #include <sys/inotify.h>
32 .sp
33 .BI "int inotify_rm_watch(int " fd ", int " wd );
34 .\" Before glibc 2.10, the second argument was types as uint32_t.
35 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
36 .SH DESCRIPTION
37 .BR inotify_rm_watch ()
38 removes the watch associated with the watch descriptor
39 .I wd
40 from the inotify instance associated with the file descriptor
41 .IR fd .
42
43 Removing a watch causes an
44 .B IN_IGNORED
45 event to be generated for this watch descriptor.
46 (See
47 .BR inotify (7).)
48 .SH RETURN VALUE
49 On success,
50 .BR inotify_rm_watch ()
51 returns zero.
52 On error, \-1 is returned and
53 .I errno
54 is set to indicate the cause of the error.
55 .SH ERRORS
56 .TP
57 .B EBADF
58 .I fd
59 is not a valid file descriptor.
60 .TP
61 .B EINVAL
62 The watch descriptor
63 .I wd
64 is not valid; or
65 .I fd
66 is not an inotify file descriptor.
67 .SH VERSIONS
68 Inotify was merged into the 2.6.13 Linux kernel.
69 .SH CONFORMING TO
70 This system call is Linux-specific.
71 .SH SEE ALSO
72 .BR inotify_add_watch (2),
73 .BR inotify_init (2),
74 .BR inotify (7)
75 .SH COLOPHON
76 This page is part of release 3.67 of the Linux
77 .I man-pages
78 project.
79 A description of the project,
80 information about reporting bugs,
81 and the latest version of this page,
82 can be found at
83 \%http://www.kernel.org/doc/man\-pages/.