From 200c09077cca37c63752a22d6818635d773834e6 Mon Sep 17 00:00:00 2001 From: Steven Luo Date: Thu, 17 Dec 2009 06:56:34 -0800 Subject: [PATCH] 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. --- config-ui/browser-switchboard-cp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); } -- 1.7.9.5