COMMAND(create) \
COMMAND(prune) \
COMMAND(run) \
- COMMAND(kill)
+ COMMAND(kill) \
+ COMMAND(reload) \
+
#define COMMAND(x) static int com_ ##x(void);
COMMANDS
#undef COMMAND
return config_file;
}
-static int com_kill(void)
+static int send_signal(int sig)
{
pid_t pid;
char *config_file = get_config_file_name();
dss_msg("%d\n", (int)pid);
return 0;
}
- ret = kill(pid, SIGTERM);
+ ret = kill(pid, sig);
if (ret < 0)
return -ERRNO_TO_DSS_ERROR(errno);
return 1;
}
+static int com_kill(void)
+{
+ return send_signal(SIGTERM);
+}
+
+static int com_reload(void)
+{
+ return send_signal(SIGHUP);
+}
+
static void dss_get_snapshot_list(struct snapshot_list *sl)
{
get_snapshot_list(sl, conf.unit_interval_arg, conf.num_intervals_arg);
process is written to stdout, but no signal is sent.
"
+groupoption "reload" -
+#~~~~~~~~~~~~~~~~~~~~~
+"force a running dss process to reload its config file"
+group="command"
+details="
+ This differs from --kill only in that SIGHUP rather than SIGTERM
+ is sent to the dss process.
+"
+
###############################
section "Rsync-related options"
###############################