Only one instance of the daemon and datahub should be allowed to run at once

Bug #392067 reported by Natan Yellin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Undecided
Natan Yellin

Bug Description

It's currently possible to run multiple instances of zeitgeist-daemon and zeitgeist-datahub at once. This shouldn't be allowed- both the daemon and the datahub should check on startup that they're not already running in a different process.

Revision history for this message
Natan Yellin (aantny) wrote :

I'm assigning this to myself- I'll commit a fix by tomorrow afternoon.

Changed in zeitgeist:
assignee: nobody → Natan Yellin (aantny)
milestone: none → 0.1
Revision history for this message
Siegfried Gevatter (rainct) wrote : Re: [Bug 392067] Re: Only one instance of the daemon and datahub should be allowed to run at once

Hehe, just a while ago we discussed in #zeitgeist that this is
something we should do :).

Just to be sure, you're going to check if it's already running looking
if it's using the D-Bus, right?

--
Siegfried-Angel Gevatter Pujals (RainCT)
Ubuntu Developer. Debian Contributor.

Revision history for this message
Natan Yellin (aantny) wrote :

Right now I'm planning on just using D-Bus directly, but eventually I'd like to switch to GtkUnique.

By default, GtkUnique uses to D-Bus to ensure that your app only has one running instance. (Just like we would.) However, it also can do so without D-Bus (using xlib or sockets), which may prove to be useful in the future.

(I'm not using GtkUnique right now because as far as I know there aren't any Python bindings.)

Revision history for this message
Natan Yellin (aantny) wrote :

I committed a fix for the daemon in rev. 939. I'll probably finish the Datahub tomorrow.

Changed in zeitgeist:
status: New → In Progress
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Wouldn't using GtkUnique make the daemon depend on GTK+, something that was to be prevented iirc?
LibUnique depens on LibGTK2.0, and I suspect that any Python implementation would do the same. Maybe something not depending on GTK should be created by Zeitgeist.

Revision history for this message
Natan Yellin (aantny) wrote :

Yes, you're correct. (At the time I wrote about GtkUnique we hadn't yet decided to make the daemon Gtk-free.)

If we want the daemon's DBUS requirement to be optional, then I think we'll just have to reimplement something like GtkUnique. (Or it might be possible to remove the Gtk dependency from GtkUnique.)

Revision history for this message
Seif Lotfy (seif) wrote :

I think this issue has been tackled right? If yes then please close it! Else target it!

Changed in zeitgeist:
milestone: 0.1 → none
Revision history for this message
Natan Yellin (aantny) wrote :

Sorry, it hasn't been fixed in the datahub yet. I'll fix it soon.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :
Revision history for this message
Natan Yellin (aantny) wrote :

Thanks Sense. That looks quite useful for implementing a backend that doesn't use D-BUS.

Seif Lotfy (seif)
Changed in zeitgeist:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.