aboutsummaryrefslogtreecommitdiff
path: root/bb.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-07-29 00:39:28 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-07-29 00:39:28 -0700
commit033455e82ceb6f2818a8639e45551764ab79c7db (patch)
tree61e952b9af60363da89ef25e6517123fe1812e4c /bb.c
parent53085198422483e96827bc54470b7a53e627f122 (diff)
Fix for stderr in child processes
Diffstat (limited to 'bb.c')
-rw-r--r--bb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bb.c b/bb.c
index 53a95bc..ee5cf73 100644
--- a/bb.c
+++ b/bb.c
@@ -876,6 +876,7 @@ static int run_script(bb_t *bb, const char *cmd)
setenv("BB", bb->nfiles ? bb->files[bb->cursor]->fullname : "", 1);
dup2(fileno(tty_out), STDOUT_FILENO);
+ dup2(fileno(tty_out), STDERR_FILENO);
dup2(fileno(tty_in), STDIN_FILENO);
execvp(args[0], (char**)args);
err(EXIT_FAILURE, "Failed to execute command: '%s'", cmd);