all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "Ryan C. Thompson" <rct@thompsonclan.org>
Cc: Christopher Schmidt <christopher@ch.ristopher.com>,
	11415@debbugs.gnu.org
Subject: bug#11415: 24.1.50; Dbus hangs indefinitely during batch mode & daemon startup
Date: Mon, 07 May 2012 16:28:05 +0200	[thread overview]
Message-ID: <87fwbc9ibu.fsf@gmx.de> (raw)
In-Reply-To: <4FA5A187.1010601@thompsonclan.org>

Michael Albinus <michael.albinus@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.





  reply	other threads:[~2012-05-07 14:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05 21:54 bug#11415: 24.1.50; Dbus hangs indefinitely during batch mode & daemon startup Ryan C. Thompson
2012-05-06 10:59 ` Michael Albinus
2012-05-07 14:28   ` Michael Albinus [this message]
2012-05-07 15:04     ` Christopher Schmidt
2012-05-14  7:08     ` Michael Albinus
2012-05-14 15:30 ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwbc9ibu.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=11415@debbugs.gnu.org \
    --cc=christopher@ch.ristopher.com \
    --cc=rct@thompsonclan.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.