Rich Felker noted that "scare text" in the man page warned about
the use of snprintf() on libc, and that some people had cited
this as a reason not to use snprintf(). Linux libc is now
ancient history, so there is no real need to keep that text.
But, while we're at it, we may as well clear out all of the
other ancient libc4 and libc5 pieces in the page. They are
nowadays more clutter than help.
Reported-by: Rich Felker <dalias@libc.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Clarify the text a little, in particular making it clearer
that the target of a watch is an i-node (not a pathname).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The target of a watch is an i-node, not a pathname. Clarify
the text to prevent the reader possibly misunderstanding
that establishing watches by two different links to the same
file might create different watch descriptors.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There's no need really to boldface names of standards and
character sets.
Reported-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There's no need really to boldface names of standards and
character sets.
Reported-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* Move /proc/sys/kernel/printk from proc(5) to this page,
and correct various details in the discussion of that file.
* Rewrite and correct various other details on the page.
* Clean out some crufty text.
* Miscellaneous minor fixes.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
It makes more sense to have the /proc/sys/kernel/printk with
the related material in syslog(2).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The kernel header file mentioned in the discussion of the KERN_*
constants has morphed and is no longer exported inside glibc.
And the definitions of the constants themselves changed subtly
with kernel commit 04d2c8c83d0e3ac5f78aeede51babb3236200112.
So, rewrite the description of the constants to be a bit more
abstract.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Explain the circumstances in detail, indicating that the
bug may be very unlikely to occur in practice.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As well as inotify_rm_watch(), file deletion and unmounting a
filesystem can also cause a watch descriptor to be deleted.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Watch descriptor IDs are returned by inotify_add_watch().
When calling inotify_rm_watch() an IN_IGNORE is placed on the
inotify queue pointing to the ID of the removed watch.
inotify_add_watchi() should not return a watch descriptor ID for
which events are still on the queue but should return an
unused ID.
Unfortunately, the existing Kernel code does not provide such a
guarantee.
Actually, in rare cases watch descriptor IDs are returned by
inotify_add_watch() for which events are still on the inotify
queue.
See https://bugzilla.kernel.org/show_bug.cgi?id=77111
Cowritten-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>