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: 11415@debbugs.gnu.org
Subject: bug#11415: 24.1.50; Dbus hangs indefinitely during batch mode & daemon startup
Date: Sun, 06 May 2012 12:59:54 +0200	[thread overview]
Message-ID: <87d36hshg5.fsf@gmx.de> (raw)
In-Reply-To: <4FA5A187.1010601@thompsonclan.org> (Ryan C. Thompson's message of "Sat, 05 May 2012 14:54:15 -0700")

"Ryan C. Thompson" <rct@thompsonclan.org> writes:

> It seems that during the startup of any emacs without a terminal
> (i.e. "--batch" or "--daemon"), recent emacs snapshots cannot make dbus
> calls. Worse, any attempt to make a dbus call will hang
> indefinitely. This stops me from being able to use some of my config in
> emacs, since it is dbus based and cannot be loaded on startup in daemon
> mode.
>
> Specifically, I can easily reproduce the bug like this:
>
> emacs-snapshot -Q --batch -l dbus --eval '(message
>  "DBus system names: %s"
>  (dbus-call-method :system dbus-service-dbus
>   dbus-path-dbus dbus-interface-dbus "ListNames"))'

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.

> There is no backtrace or anything, because the dbus call never
> returns.

In theory, it shall accept at least timeouts, like 

emacs -Q --daemon -l dbus --eval \
  '(message "DBus system names: %s" \
     (dbus-call-method \
      :system dbus-service-dbus dbus-path-dbus dbus-interface-dbus \
      "ListNames" :timeout 5000))'

But it doesn't, which is another bug to be fixed.

Best regards, Michael.





  reply	other threads:[~2012-05-06 10:59 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 [this message]
2012-05-07 14:28   ` Michael Albinus
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=87d36hshg5.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=11415@debbugs.gnu.org \
    --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.