how to restart dbus-daemon

Krzysztof Konopko krzysztof.konopko at youview.com
Mon Feb 4 02:03:59 PST 2013


Hi Soho,

See my answers below.

Cheers,
Kris

On 04/02/13 03:01, Soho Soho123 wrote:
> Hi,
> 
> Since the system configuration has been update.

It depends which parts of the configuration have changed.  Most of the
changes will very likely require restarting dbus-daemon.  Ad if it's
system bus, this implies rebooting the system.

> I have to re-start the application that using dbus related.

You more likely require to restart dbus-daemon.  See above.

> the parent process means "the application that using "system("")" to
> start dbus-daemon".

Then it probably means that your "parent" application has been forked by
dbus-daemon (it's been activated over D-Bus as a service) and it haven't
created it's own session (setsid()). So formally your "parent"
application is a child of dbus-daemon and it also receives SIGTERM.

> And is it enough to send SIGHUP to dbus daemon when the target system
> configuration updated? Because the other application using dbus,
> should that be re-start?
> Could you explain more detail  that you mentioned:
> "If the configuration changes can be
>  picked up by the daemon without kicking everyone off the bus, then
>  you're done"
> 

Please read more here:
http://linux.die.net/man/1/dbus-daemon

See the reference implementation source code (libdbus) to find out which
parts of configuration do not require restarting dbus-daemon and can be
updated with SIGHUP.


> 
> Thanks!
> Soho
> 
> 2013/2/1 Krzysztof Konopko <krzysztof.konopko at youview.com>:
>> What do you mean by "parent process"?
>> Use pstree -ps fpr the dbus-daemon process and for your "parent" process
>> (whichever it is) to learn the relationships.
>>
>> Why do you ever want to do this?  If this is because you've changed the
>> configuration, then send SIGHUP.  If the configuration changes can be
>> picked up by the daemon without kicking everyone off the bus, then
>> you're done.  Otherwise you need to reboot the system.
>>
>> Kris
>>
>> On 01/02/13 03:44, Soho Soho123 wrote:
>>> Hi All,
>>>
>>> I got the trouble when I try to restart dbus-daemon.
>>> the steps I used :
>>> 1. kill  -SIGTERM <dbus daemon pid>
>>> 2. dbus-daemon --config-file=/etc/dbus-1/system.conf
>>>
>>> in my process,
>>> I use the code to  finish:
>>> system("kill  -SIGTERM <dbus daemon pid>");
>>> system("dbus-daemon --config-file=/etc/dbus-1/system.conf");
>>> it is very strange,
>>> the first step :
>>> system("kill  -SIGTERM <dbus daemon pid>"); ====> it will cause the
>>> parent process receive terminate signal.
>>>
>>> Does someone have any idea about this issue?
>>> Because I just send terminate to dbus daemon, the parent process
>>> should keep running,
>>>
>>> thanks!
>>>
>>> Best Regards,
>>> Soho
>>> _______________________________________________
>>> dbus mailing list
>>> dbus at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dbus
>>>
>>
>> _______________________________________________
>> dbus mailing list
>> dbus at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dbus
> 



More information about the dbus mailing list