X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=dss.c;h=7a46eed23531dd2f3dfa657bce877414ee5b2a0c;hb=0fa93c1389ecd10bb11a14968c4120a49bbc90e6;hp=b27bdf6604d14f44dfa34d402e1c22f6e37055ae;hpb=c2510797579203c7fd6bef531f29726a56055298;p=dss.git diff --git a/dss.c b/dss.c index b27bdf6..7a46eed 100644 --- a/dss.c +++ b/dss.c @@ -826,16 +826,13 @@ out: static void exit_hook(int exit_code) { int fds[3] = {0, 0, 0}; - char *cmd; + char *argv[] = {conf.exit_hook_arg, dss_strerror(-exit_code), NULL}; 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); + DSS_NOTICE_LOG("executing %s %s\n", argv[0], argv[1]); + dss_exec(&pid, conf.exit_hook_arg, argv, fds); } static int com_run(void)