D-Bus unit tests

Thomas Sondergaard ts at medical-insight.com
Wed Nov 12 12:01:34 PST 2014


On 2014-11-12 14:49, Ralf Habacker wrote:
> dbus-daemon --config-file=... --adress=tcp:host=localhost,port=0
> --print-address
>
> "port=0" let the dbus-daemon select a free port see
> http://dbus.freedesktop.org/doc/dbus-specification.html#transports-tcp-sockets)

I have a hand-started dbus-daemon run from my test program using 
QProcess. So far I'm using "dbus-daemon --session --print-address" on 
Linux. Just trying to run that command in two different cmd prompts on 
Windows, I see that the second one fails with "Failed to start message 
bus: Address 'autolaunch' already used". If I add 
"--adress=tcp:host=localhost,port=0" like you suggest I can start 
multiple. Thanks for that important little detail!

>
> and --print-address reports the currently used address for clients to
> stdout.

Yep, I'm already using this.

Great help on this mailing list. Thanks :-)

Thomas




More information about the dbus mailing list