Call setsid() for hook/notification commands
We do not want hook or notification commands to interact with the terminal in any way. Create a new session for them. Addresses GitHub issue #326. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
@@ -51,7 +51,7 @@ int run_hook(const char *name)
|
||||
arg[0] = hook_path;
|
||||
arg[1] = NULL;
|
||||
|
||||
if ((pid = shell_exec(&pin, &pout, &perr, *arg, arg))) {
|
||||
if ((pid = shell_exec(&pin, &pout, &perr, 1, *arg, arg))) {
|
||||
ret = child_wait(&pin, &pout, &perr, pid);
|
||||
if (ret > 0 && WIFEXITED(ret)) {
|
||||
asprintf(&mesg, "%s hook: exit status %d",
|
||||
|
||||
Reference in New Issue
Block a user