GNU bug report logs -
#21337
25.0.50; inotify error message
Previous Next
Reported by: Robert Pluim <rpluim <at> gmail.com>
Date: Mon, 24 Aug 2015 12:13:02 UTC
Severity: normal
Merged with 21361
Found in version 25.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 21337 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>
> Strange. Does auto-revert-mode work in "emacs -Q"? Do the related
> tests in the test suite pass?
>
Yes and yes.
> Can you use strace to see what error is that and what directory is
> being watched?
strace indicates that the directory where emacs is being run from is
being watched, along with my home directory plus any directories
containing files that are being visited. What's strange is that
inotify_add_watch is being called 22 times for the current directory.
I've debugged inotify_callback a little. The expectation of this code
to_read = 0;
if (ioctl (fd, FIONREAD, &to_read) == -1)
xsignal1
(Qfile_notify_error,
build_string ("Error while trying to retrieve file system events"));
buffer = xmalloc (to_read);
n = read (fd, buffer, to_read);
if (n < 0)
{
is that the read will succeed, however to_read is very often 0, so
it's not surprising the read fails. (what does xmalloc do when its
argument is 0?)
My understanding was that the callback should only be called when
there are actual inotify events to process, so this behaviour is
somewhat surprising to me.
I can add in skipping the read if to_read == 0, but I suspect that's
just papering over the cracks.
Regards
Robert
This bug report was last modified 9 years and 261 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.