GNU bug report logs -
#11415
24.1.50; Dbus hangs indefinitely during batch mode & daemon startup
Previous Next
Reported by: "Ryan C. Thompson" <rct <at> thompsonclan.org>
Date: Sat, 5 May 2012 21:57:02 UTC
Severity: normal
Tags: patch
Found in version 24.1.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
Michael Albinus <michael.albinus <at> gmx.de> writes:
> In Emacs 24.1.50, `dbus-call-method' changed from a synchronous call to
> an asynchronous one (see etc/NEWS). If Emacs runs in batch mode, it
> doesn't seem to read incoming events. Therefore, the return event of the
> call is not read.
>
> I will see what can be done. Either we must enable Emacs to receive some
> special input events also in batch mode. Or we must check inside
> `dbus-call-method', whether Emacs runs daemonized, and use the blocking
> call then.
>
> I would prefer the first alternative, because receiving D-Bus signals and
> running Emacs as D-Bus enabled server does not work either when Emacs
> does not accept incoming events.
I have debugged further. The problem is in kbd_buffer_get_event of
keyboard.c - it does not read special events when noninteractive. The
following patch cures the problem for me:
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs/src/keyboard.c.~108144~
--- /home/albinus/src/emacs/src/keyboard.c
***************
*** 3801,3806 ****
--- 3801,3807 ----
}
#endif /* subprocesses */
+ #if 0 /* We want to read special events in batch mode. */
if (noninteractive
/* In case we are running as a daemon, only do this before
detaching from the terminal. */
***************
*** 3811,3816 ****
--- 3812,3818 ----
*kbp = current_kboard;
return obj;
}
+ #endif
/* Wait until there is input available. */
for (;;)
--8<---------------cut here---------------end--------------->8---
However, I don't know whether it has undesired side effects. What do
people think?
Best regards, Michael.
This bug report was last modified 13 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.