From 77b2dcb4627ed288d481d60501134795c779e44e Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 1 Sep 2024 14:01:18 +0200 Subject: [PATCH] Fix ctrl-c being ignored during builtin wait Same as d21ed0fb2 (Disable terminal protocols before expanding wildcards, 2024-07-31). Also mention a related issue in the changelog. --- CHANGELOG.rst | 1 + src/builtins/wait.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 34841994d..b7b730ad2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -46,6 +46,7 @@ Notable backwards-incompatible changes The flag will eventually be made read-only, making it impossible to turn off. - Fish no longer searches directories from the Windows system/user ``$PATH`` environment variable for Linux executables. To execute Linux binaries by name (i.e. not with a relative or absolute path) from a Windows folder, make sure the ``/mnt/c/...`` path is explicitly added to ``$fish_user_paths`` and not just automatically appended to ``$PATH`` by ``wsl.exe`` (:issue:`10506`). - Under WSLv1, backgrounded jobs that have not been disowned and do not terminate on their own after a ``SIGHUP`` + ``SIGCONT`` sequence will be explicitly killed by fish on exit/exec (after the usual prompt to close or disown them) to work around a WSL deficiency that sees backgrounded processes that run into ``SIGTTOU`` remain in a suspended state indefinitely (:issue:`5263`). The workaround is to explicitly ``disown`` processes you wish to outlive the shell session. +- :kbd:`ctrl-c` no longer cancels builtin ``read``. Notable improvements and fixes diff --git a/src/builtins/wait.rs b/src/builtins/wait.rs index e23cd9195..a5d730965 100644 --- a/src/builtins/wait.rs +++ b/src/builtins/wait.rs @@ -167,6 +167,8 @@ pub fn wait(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> Opt return STATUS_CMD_OK; } + crate::input_common::terminal_protocols_disable_ifn(); + if w.wopt_index == argc { // No jobs specified. // Note this may succeed with an empty wait list.