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>
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>
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>
The unicode(7) page will look more modern with few small changes:
- drop old BUGS section, editors cope with UTF-8 ok these days,
and perhaps the state-of-the-art is better described elsewhere
anyway than in a man page
- drop old suggestion about avoiding combined characters
- refer to LANANA for Linux zone, add registry file reference
- drop a reference to an inactive/dead mailing list
- update some reference URLs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
And restore a piece about Biblical Hebrew that was
inadvertently deleted by Marko Myllynen's patch.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Rewrite the introduction to make Unicode's prominence more obvious.
Reformulate parts of the text to reflect current Unicode world.
Minor clarification for ASCII/ISO sections, some other minor fixes.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
It certainly seems like that change happened some time ago.
Reported-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Helpful for three purposes, 1) shows the expected naming scheme,
2) shows where to point LOCPATH to, and 3) gives an idea to the
attentive how to use a more generic, location independent
directory with location dependent, more specific ones.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
mmap() and msync() were already described as not leading to
inotify events. This patch adds munmap(). I created and executed
a test to verify this.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This example of the usage of the inotify API shows the
usage of inotify_init1(2) and inotify_add_watch(2) as well
as polling and reading from the inotify file descriptor.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Example from https://sourceware.org/glibc/wiki/Locales
After modifying a locale, make sure it compiles, and install it to a
temporary directory for testing:
unset LC_ALL
LOCALE=fi_FI
export I18NPATH=$HOME/locale-test/
export LOCPATH=$HOME/locale-test/
mkdir -p $LOCPATH
localedef --no-archive -f localedata/charmaps/UTF-8 -i localedata/locales/$LOCALE $I18NPATH/$LOCALE.UTF-8
LC_TIME=$LOCALE.UTF-8 locale -ck LC_TIME
LC_TIME=$LOCALE.UTF-8 locale -ck date_fmt
LC_TIME=$LOCALE.UTF-8 date
LC_CTYPE=$LOCALE.UTF-8 iconv -f UTF-8 -t ASCII//TRANSLIT < translit-test-input.txt
LC_COLLATE=$LOCALE.UTF-8 sort < sorting-test-input.txt
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk pointed me to alignment issues which may
arise when reading misaligned integers.
On some systems integer values can only be read if they are
correctly aligned. Other system have a lower performance when
reading from or writing to misaligned memory positions.
Therefore, the buffer used to call read(2) for a fanotify
file descriptor should have the same alignment as
struct fanotify_event_metadata.
Due to the casting to char* inside the macros
FAN_EVENT_OK and FAN_EVENT_NEXT we can use any
data structure for the buffer.
With the patch an array of struct fanotify_event_metadata is
used as buffer which seems a natural choice to ensure proper
alignment.
It should be remembered that the offset between events is given
by field event_len and iterating over the array may not be
allowable in future. Instead the macros should be used.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
FAN_EVENT_NEXT() does not update 'meta'; rather, it returns a
pointer to the next metadata structure. In addition, generally
rework the description to be a bit clearer and more detailed.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Change consistent with the fact that the scheduling overview
page is now sched(7) not sched_setscheduler(2).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
SCHED_DEADLINE content has been reviewed by Peter and Juri
Reviewed-by: Juri Lelli <juri.lelli@gmail.com>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
In a couple of places, sched_setscheduler(2) is mentioned as the
way of setting policies. But now there is sched_setattr(2) as
well, rewrite the text in a more generic way.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There are nowadays multiple ways to set sched_priority (and
in fact there always were, since we also had sched_setparam(2)).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
All of the removed text is in sched_setscheduler(2) and
should have been trimmed from this page.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>