Heads up: bluetoothd on-demand startup

Lennart Poettering mzerqung at 0pointer.de
Fri Jun 12 18:44:23 UTC 2009


On Fri, 12.06.09 19:26, Bastien Nocera (bnocera at redhat.com) wrote:

> Every time there's an add action for a Bluetooth device, udev will run
> "bluetoothd --udev".
> 
> bluetoothd will fail with an error if D-Bus isn't started (on bootup),
> and the udev coldplug (done in udev-post) will run the rule again.
> 
> bluetoothd will silently fail when it's already running.
> 
> bluetoothd will exit itself after 30 seconds when no adapters are
> present. There's a potential race if the udev add event happens in
> between the time the time the running bluetoothd reliquinshes its D-Bus
> service, and the new one starts up.

This could be fixed by first releasing the service name synchronously,
then processing all queued requests and only then closing/exiting.

Hmm, will bluetoothd also be started via bus activation? If so, it
wuld probably make sense to issue a StartByName D-Bus request from the
udev rule and let dbus handle all the ordering/synchronization issues
with starting up bluetoothd.

I know at least one application (PA) that wouldn't reconnect to coming
and going bluetoothd's, that's why I am asking.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4




More information about the fedora-devel-list mailing list