Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how do the dbus auto deactivation work? [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fpemud
Tux's lil' helper
Tux's lil' helper


Joined: 15 Feb 2012
Posts: 123

PostPosted: Thu Jun 13, 2013 12:41 am    Post subject: how do the dbus auto deactivation work? [solved] Reply with quote

I have an impression that a dbus service can be auto activated when accessed, and also can be auto deactivated when no one needs it.
Now I'm writing myself a simple daemon to publish a dbus service, so I want to know the detail.

I think activation means daemon process starts, and deactivation means daemon process exits.
From this page, I've got a clear image of the auto activation part.

But I can't find any information on auto deactivation.
AFAIK, there's a glib main loop in dbus service daemon, the main loop only quits when g_main_loop_quit is called.
Then who calls g_main_loop_quit? when it gets called?


Last edited by fpemud on Thu Jun 13, 2013 2:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 368

PostPosted: Thu Jun 13, 2013 1:44 am    Post subject: Reply with quote

I've never heard of d-bus auto-deactivation. However its possible to write a service, and the have the service launcher file launch your program with an argument list to let the program knows its been auto-lunched. The program can then exit (possibly after waiting a while, using g_timeout_add_seconds) when it has no incoming connections.
Back to top
View user's profile Send private message
fpemud
Tux's lil' helper
Tux's lil' helper


Joined: 15 Feb 2012
Posts: 123

PostPosted: Thu Jun 13, 2013 2:09 pm    Post subject: Reply with quote

I can't find the word deactivation in dbus specification neither.
I think I misunderstood it.

I find this page, perhaps it is where my impression came from.
I don't think I need this function. The standard dbus behavior is good for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum