GNU bug report logs -
#13662
24.3.50; inotify-add-watch fails in batch mode
Previous Next
Reported by: Chong Yidong <cyd <at> gnu.org>
Date: Sat, 9 Feb 2013 14:37:02 UTC
Severity: important
Found in version 24.3.50
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13662 in the body.
You can then email your comments to 13662 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13662
; Package
emacs
.
(Sat, 09 Feb 2013 14:37:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 09 Feb 2013 14:37:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On latest trunk, `make check' fails with
2 unexpected results:
FAILED ert-test-record-backtrace
FAILED inotify-file-watch-simple
The first of this is Bug#13064 (still not fixed; I couldn't disentangle
the mess of CL-isms and closures involved in that bug). The second
failure is relatively new: apparently, inotify-file-watch-simple works
when Emacs is interactive but fails in batch mode.
Another way to see this is to create a file with the contents
(let* ((temp-file (make-temp-file "inotify-simple"))
(events 0)
(wd
(inotify-add-watch temp-file t (lambda (ev)
(setq events (1+ events))))))
(unwind-protect
(progn
(with-temp-file temp-file
(insert "Foo\n"))
(sit-for 5)
(message ">> %d <<" events))
(inotify-rm-watch wd)))
and run `emacs -batch -l foo.el'. This prints ">> 0 <<", indicating
that the inotify watcher failed to run. If you repeat omitting -batch,
">> 4 <<" is printed, as expected.
In GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
of 2013-02-09 on tsparkle
Bzr revision: 111704 cyd <at> gnu.org-20130209050902-vge73m9xbyx96t2q
Windowing system distributor `The X.Org Foundation', version 11.0.11301000
Configured using:
`configure --with-x-toolkit=gtk3 CFLAGS=-g --no-create --no-recursion'
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Fri, 17 Jan 2014 11:57:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Chong Yidong <cyd <at> gnu.org>
:
bug acknowledged by developer.
(Fri, 17 Jan 2014 11:57:05 GMT)
Full text and
rfc822 format available.
Message #10 received at 13662-done <at> debbugs.gnu.org (full text, mbox):
Chong Yidong <cyd <at> gnu.org> writes:
> Another way to see this is to create a file with the contents
>
> (let* ((temp-file (make-temp-file "inotify-simple"))
> (events 0)
> (wd
> (inotify-add-watch temp-file t (lambda (ev)
> (setq events (1+ events))))))
> (unwind-protect
> (progn
> (with-temp-file temp-file
> (insert "Foo\n"))
> (sit-for 5)
> (message ">> %d <<" events))
> (inotify-rm-watch wd)))
>
> and run `emacs -batch -l foo.el'. This prints ">> 0 <<", indicating
> that the inotify watcher failed to run. If you repeat omitting -batch,
> ">> 4 <<" is printed, as expected.
Should be fixed with r116052. Instead of `sit-for', one needs to apply
`read-event'.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13662
; Package
emacs
.
(Sat, 25 Jan 2014 14:18:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 13662 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Date: Fri, 17 Jan 2014 12:56:51 +0100
> Cc: 13662-done <at> debbugs.gnu.org
>
> Chong Yidong <cyd <at> gnu.org> writes:
>
> > Another way to see this is to create a file with the contents
> >
> > (let* ((temp-file (make-temp-file "inotify-simple"))
> > (events 0)
> > (wd
> > (inotify-add-watch temp-file t (lambda (ev)
> > (setq events (1+ events))))))
> > (unwind-protect
> > (progn
> > (with-temp-file temp-file
> > (insert "Foo\n"))
> > (sit-for 5)
> > (message ">> %d <<" events))
> > (inotify-rm-watch wd)))
> >
> > and run `emacs -batch -l foo.el'. This prints ">> 0 <<", indicating
> > that the inotify watcher failed to run. If you repeat omitting -batch,
> > ">> 4 <<" is printed, as expected.
>
> Should be fixed with r116052. Instead of `sit-for', one needs to apply
> `read-event'.
This breaks the file-notify-test02-events test on w32. It looks like
read-event never returns there. If I replace that with sit-for, it
does return, but the test still fails because
file-notify--test-results remains nil, something that wasn't being
tested when I last ran the test (in early December).
Frankly, given the inordinate amount of work it took to try to get
file notifications work in batch mode, I'd rather we declared they are
not expected to work in batch, and moved on. If you, for some reason,
still want to stick with that test, please mark
file-notify-test02-events to be skipped for w32, as I'm tired of
fixing the breakage there time and again. Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13662
; Package
emacs
.
(Sun, 26 Jan 2014 15:57:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 13662 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Should be fixed with r116052. Instead of `sit-for', one needs to apply
>> `read-event'.
>
> This breaks the file-notify-test02-events test on w32.
Well, *this* bug report is about inotify-file-watch-simple, which
should be skipped on w32.
You are speaking about bug#16519. I will comment in another message.
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 24 Feb 2014 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 120 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.