[vlc-devel] [vlc-commits] single instance: Avoid initializing twice because of dbus activation

Mirsal Ennaime mirsal at videolan.org
Sat May 12 22:14:44 CEST 2012

On Sat, 2012-05-12 at 22:40 +0300, Rémi Denis-Courmont wrote:
> Le samedi 12 mai 2012 22:34:00 Mirsal Ennaime, vous avez écrit :
> > vlc | branch: master | Mirsal Ennaime <mirsal at videolan.org> | Sat May 12
> > 15:27:18 2012 +0200| [bcc158b70019bdd2d1ab647173cb1ea41751f706] |
> > committer: Mirsal Ennaime
> > 
> > single instance: Avoid initializing twice because of dbus activation
> > 
> > The single instance mode currently tries to contact another VLC instance
> > through dbus in order to find out if one is running. With dbus activation,
> > it results to the dbus daemon launching a new VLC instance while the
> > first one blocks until the new one answers the call
> > 
> > This patch uses org.freedesktop.DBus.NameHasOwner instead in order to get
> > an answer from the dbus daemon without it launching a second instance.
> Why not just disable activation and call the real function directly?

Disabling dbus activation is done by not installing a service file,
which distributions will do nonetheless and have VLC take twice as much
time to launch when the single instance mode is enabled, for no obvious

I don't think avoiding a call to dbus_name_has_owner() is worth being
incompatible with dbus activation, which is a nice feature.

I might be wrong, though.

Best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120512/62b7e93a/attachment.sig>

More information about the vlc-devel mailing list