From d5a239e59ec0e84a47d499270f618e432abd747f Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 7 Jun 2020 17:21:57 -0700 Subject: [PATCH] Bravely stop attempting to modify the terminal size Prior to this fix, fish would attempt to resize the terminal via TIOCSWINSZ, which was added as part of #3740. In practice this probably never did anything useful since generally only the tty master can use this. Remove the support and note it in the changelog. --- CHANGELOG.rst | 1 + src/common.cpp | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cbfeccc66..6e1b2a4fd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -136,6 +136,7 @@ Completions Deprecations and removed features --------------------------------- +- fish no longer attempts to modify the terminal size via `TIOCSWINSZ`. For distributors and developers ------------------------------- diff --git a/src/common.cpp b/src/common.cpp index 5fd3b228f..61c5482e0 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -1801,13 +1801,6 @@ static void export_new_termsize(struct winsize *new_termsize, env_stack_t &vars) auto lines = vars.get(L"LINES", ENV_EXPORT); vars.set_one(L"LINES", ENV_GLOBAL | (lines.missing_or_empty() ? ENV_DEFAULT : ENV_EXPORT), std::to_wstring(int(new_termsize->ws_row))); - -#ifdef HAVE_WINSIZE - // Only write the new terminal size if we are in the foreground (#4477) - if (tcgetpgrp(STDOUT_FILENO) == getpgrp()) { - ioctl(STDOUT_FILENO, TIOCSWINSZ, new_termsize); - } -#endif } /// Get the current termsize, lazily computing it. Return by reference if it changed.