From 451573b4340e379a20b341debefeab76b483291c 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 c0ad1dc50..e2fdb4d29 100644 --- a/src/libtmux/server.py +++ b/src/libtmux/server.py @@ -247,7 +247,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