View previous topic :: View next topic |
Author |
Message |
fpemud Guru
Joined: 15 Feb 2012 Posts: 349
|
Posted: Thu Jun 13, 2013 12:41 am Post subject: how do the dbus auto deactivation work? [solved] |
|
|
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 |
|
|
salahx Guru
Joined: 12 Mar 2005 Posts: 530
|
Posted: Thu Jun 13, 2013 1:44 am Post subject: |
|
|
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 |
|
|
fpemud Guru
Joined: 15 Feb 2012 Posts: 349
|
Posted: Thu Jun 13, 2013 2:09 pm Post subject: |
|
|
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 |
|
|
|