GNU bug report logs - #13662
24.3.50; inotify-add-watch fails in batch mode

Previous Next

Package: emacs;

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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Chong Yidong <cyd <at> gnu.org>
Subject: bug#13662: closed (Re: bug#13662: 24.3.50; inotify-add-watch
 fails in batch mode)
Date: Fri, 17 Jan 2014 11:57:05 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#13662: 24.3.50; inotify-add-watch fails in batch mode

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 13662 <at> debbugs.gnu.org.

-- 
13662: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13662
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Michael Albinus <michael.albinus <at> gmx.de>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 13662-done <at> debbugs.gnu.org
Subject: Re: bug#13662: 24.3.50; inotify-add-watch fails in batch mode
Date: Fri, 17 Jan 2014 12:56:51 +0100
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.

[Message part 3 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; inotify-add-watch fails in batch mode
Date: Sat, 09 Feb 2013 22:35:49 +0800
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'



This bug report was last modified 11 years and 144 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.