From c72c6312d440c18bf0aab41440cf3a4070e4adc9 Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 21 Jul 2023 21:08:27 +0200 Subject: [PATCH] sh: Use input_file instead of hardcoding stdin everywhere in tcsetpgrp() --- shell/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/main.cpp b/shell/main.cpp index 253cd377..91944445 100644 --- a/shell/main.cpp +++ b/shell/main.cpp @@ -123,7 +123,7 @@ Result luna_main(int argc, char** argv) signal(SIGTTOU, SIG_IGN); signal(SIGINT, sigint_handler); - tcsetpgrp(STDIN_FILENO, getpgid(0)); + tcsetpgrp(input_file->fd(), getpgid(0)); } TRY(init_builtins());