aboutsummaryrefslogtreecommitdiffstats
path: root/src/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hooks.c')
-rw-r--r--src/hooks.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hooks.c b/src/hooks.c
index e3abf44..5412582 100644
--- a/src/hooks.c
+++ b/src/hooks.c
@@ -165,8 +165,10 @@ run_hooks(const char *argv[])
break;
case 0:
- if (dup2(STDOUT_FILENO, STDERR_FILENO) != STDERR_FILENO)
- _eprintf("dup2 <stdout> <stderr>:");
+ if (dup2(STDOUT_FILENO, STDERR_FILENO) != STDERR_FILENO) {
+ weprintf("dup2 <stdout> <stderr>:");
+ _exit(1);
+ }
stpcpy(stpcpy(&dirpath[dirpathlen], "/"), f->d_name);
argv[0] = dirpath;
execv(dirpath, (const void *)argv);