summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2024-03-07 14:49:49 +0100
committerMaxime Coste <mawww@kakoune.org>2024-03-08 20:10:10 +1100
commitf26d4ea4bfd3f7e43e4e96a790b19cd6e1e8b17f (patch)
tree6351cf3af8f058107c9d57605b2d43ae4b1fdd29
parenta1c52e08a4e01ec48f920b7577dcf7486123fa5e (diff)
rc windowing tmux: remove redundant backgrounding
The tmux-terminal commands typically run tmux split-window kak -c ${kak_session} </dev/null >/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.
-rw-r--r--rc/windowing/tmux.kak4
1 files 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
}
}