From 7b5667b11f8c240433e36e3dde40a934a7b9fbc9 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Sat, 26 Aug 2023 14:53:28 +0200 Subject: [PATCH] parse_execution: Remove dead tcgetattr code This used to be assigned to the job, but that was removed in f30ce21aaa91a3ea1a3a871eed40b2971c551455. Since then this was vestigial. It could have technically errored out, but we should be catching that where we use the actual modes, not here. --- src/parse_execution.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp index fa67b625f..85a5285b2 100644 --- a/src/parse_execution.cpp +++ b/src/parse_execution.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -1307,15 +1306,6 @@ end_execution_reason_t parse_execution_context_t::run_1_job(const ast::job_pipel // We definitely do not want to execute anything if we're told we're --no-execute! if (no_exec()) return end_execution_reason_t::ok; - // Get terminal modes. - struct termios tmodes = {}; - if (parser->is_interactive() && tcgetattr(STDIN_FILENO, &tmodes)) { - // Need real error handling here. - wperror(L"tcgetattr"); - parser->set_last_statuses(statuses_t::just(STATUS_CMD_ERROR)); - return end_execution_reason_t::error; - } - // Increment the eval_level for the duration of this command. scoped_push saved_eval_level(&parser->eval_level, parser->eval_level + 1);