+/* Ignore reconfiguration signal (SIGHUP)
+ When not running in continuous mode, no SIGHUP handler is installed, which
+ causes browser-switchboard to quit on a reconfig request. This is normally
+ what we want -- but if we're already in the process of dispatching a
+ request, we'll quit anyway after finishing what we're doing, so ignoring the
+ signal is the right thing to do. */
+static void ignore_reconfig_requests(void) {
+ struct sigaction act;
+
+ act.sa_flags = SA_RESTART;
+ sigemptyset(&(act.sa_mask));
+ act.sa_handler = SIG_IGN;
+ sigaction(SIGHUP, &act, NULL);
+}
+