From 5710a8bd7fc3d5a3e46f108c16199ed7553515f0 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 4 Apr 2021 10:43:26 -0400 Subject: Add parameter to redirect stderr to shell_exec() Add a function parameter to allows redirecting stderr in addition to stdin and stdout. The parameter will be used with a follow-up change. Signed-off-by: Lukas Fleischer --- src/hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/hooks.c') diff --git a/src/hooks.c b/src/hooks.c index b4933af..cf1db5e 100644 --- a/src/hooks.c +++ b/src/hooks.c @@ -53,8 +53,8 @@ int run_hook(const char *name) arg[0] = hook_cmd; arg[1] = NULL; - if ((pid = shell_exec(NULL, NULL, *arg, arg))) { - ret = child_wait(NULL, NULL, pid); + if ((pid = shell_exec(NULL, NULL, NULL, *arg, arg))) { + ret = child_wait(NULL, NULL, NULL, pid); if (ret > 0 && WIFEXITED(ret)) { asprintf(&mesg, "%s hook: exit status %d", name, -- cgit v1.2.3-54-g00ecf