From: Steven Luo Date: Thu, 17 Dec 2009 14:56:34 +0000 (-0800) Subject: HUP running browser-switchboard processes after saving config X-Git-Tag: v3.0rc1~7^2~1 X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=commitdiff_plain;h=200c09077cca37c63752a22d6818635d773834e6;hp=d3235c153fcd1cb13fff96eeff47713b56f3885f;ds=sidebyside HUP running browser-switchboard processes after saving config Sending SIGHUP to a running browser-switchboard in continuous mode causes it to reload its config. If not in continuous mode, it'll die and the next browser-switchboard will pick up the config changes. --- diff --git a/config-ui/browser-switchboard-cp.c b/config-ui/browser-switchboard-cp.c index 142b008..bee946b 100644 --- a/config-ui/browser-switchboard-cp.c +++ b/config-ui/browser-switchboard-cp.c @@ -260,7 +260,10 @@ out: static void do_reconfig(void) { save_config(); - /* TODO: send HUP to browser-switchboard */ + /* Try to send SIGHUP to any running browser-switchboard process + This causes it to reread config files if in continuous_mode, and + die so that the config will be reloaded on next start otherwise */ + system("kill -HUP `busybox ps | fgrep 'python /usr/bin/browser-switchboard' | fgrep -v grep | awk '{ print $1 }'` > /dev/null 2>&1"); }