4d9f41 mutex_get(): Change parameter from key_t to int.
55c90e Implement --reload.
492928 Add the --kill subcommand.
dd42f7 Use semaphore locking to avoid starting dss multiple times.
17eea8 Introduce get_config_file_name().
That topic was cooking in next for a quite some time now.
pid_t pid;
DSS_NOTICE_LOG("executing %s %s\n", argv[0], argv[1]);
- dss_exec(&pid, conf.exit_hook_arg, argv, fds);
+ dss_exec(&pid, conf.exit_hook_arg, argv);
}
+ static void lock_dss_or_die(void)
+ {
+ char *config_file = get_config_file_name();
+ int ret = lock_dss(config_file);
+
+ free(config_file);
+ if (ret < 0) {
+ DSS_EMERG_LOG("failed to lock: %s\n", dss_strerror(-ret));
+ exit(EXIT_FAILURE);
+ }
+ }
+
static int com_run(void)
{
int ret;