From f26d4ea4bfd3f7e43e4e96a790b19cd6e1e8b17f Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Thu, 7 Mar 2024 14:49:49 +0100 Subject: [PATCH] rc windowing tmux: remove redundant backgrounding The tmux-terminal commands typically run tmux split-window kak -c ${kak_session} /dev/null 2>&1 & The tmux process runs in the background with output silenced. This is not necessary because "tmux split-window" is a thin client that merely forwards its arguments to the tmux server. All our wrappers for other terminal-servers (kitty, iterm, screen, wezterm, zellij) simply run in the foreground, not silencing any errors. The tmux backgrounding was added in 208b91627 (Move client.kak as x11.kak and change tmux.kak to be its peer, 2015-11-17), probably for consistency with x11.kak. That one is different however because it potentially spawns a full terminal, not just a client that briefly talks to a terminal server - that's why x11-terminal needs to use "setsid," to avoid killing said terminal when we signal our process group. Remove the backgrounding from tmux.kak for consistency and to reduce surprise. --- rc/windowing/tmux.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/windowing/tmux.kak b/rc/windowing/tmux.kak index ab0743c7..2d43db0e 100644 --- a/rc/windowing/tmux.kak +++ b/rc/windowing/tmux.kak @@ -26,9 +26,9 @@ define-command -hidden -params 2.. tmux-terminal-impl %{ # ideally we should escape single ';' to stop tmux from interpreting it as a new command # but that's probably too rare to care if [ -n "$TMPDIR" ]; then - TMUX=$tmux tmux $tmux_args env TMPDIR="$TMPDIR" "$@" < /dev/null > /dev/null 2>&1 & + TMUX=$tmux tmux $tmux_args env TMPDIR="$TMPDIR" "$@" else - TMUX=$tmux tmux $tmux_args "$@" < /dev/null > /dev/null 2>&1 & + TMUX=$tmux tmux $tmux_args "$@" fi } }