From 08ed44d24e8521303194560cfb8852c4d0dfa79a Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 7 Mar 2026 18:01:47 -0600 Subject: [PATCH] server(fix[raise_if_dead]): suppress check_call stdout/stderr why: subprocess.check_call without stdout/stderr redirection inherits the parent process's file descriptors, printing tmux output directly to the terminal. Library code should not produce terminal noise. what: - Pass stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL to check_call --- src/libtmux/server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libtmux/server.py b/src/libtmux/server.py index ba5c939e6..66e1d1744 100644 --- a/src/libtmux/server.py +++ b/src/libtmux/server.py @@ -281,7 +281,11 @@ def raise_if_dead(self) -> None: cmd_args.insert(0, f"-f{self.config_file}") try: - subprocess.check_call([resolved, *cmd_args]) + subprocess.check_call( + [resolved, *cmd_args], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + ) except FileNotFoundError: raise exc.TmuxCommandNotFound from None