From 1cccc1d5a456c109a7ede17eb40df090f6b37bd8 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 c69463424..30046f80d 100644 --- a/src/libtmux/server.py +++ b/src/libtmux/server.py @@ -246,7 +246,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