+static void exit_hook(int exit_code)
+{
+ int fds[3] = {0, 0, 0};
+ char *cmd;
+ pid_t pid;
+
+ if (!conf.exit_hook_given)
+ return;
+ cmd = make_message("%s %s", conf.exit_hook_arg,
+ dss_strerror(-exit_code));
+ DSS_NOTICE_LOG("executing %s\n", cmd);
+ dss_exec_cmdline_pid(&pid, cmd, fds);
+ free(cmd);
+}
+