From f575187517fb2dab7cb3a9c5a6eeec47da3df676 Mon Sep 17 00:00:00 2001 From: Matt <4922458+mbrla0@users.noreply.github.com> Date: Thu, 7 Aug 2025 19:07:20 -0300 Subject: [PATCH] Check for OSError in OpportunisticTerminalControl --- pwndbg/dbg/lldb/repl/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwndbg/dbg/lldb/repl/io.py b/pwndbg/dbg/lldb/repl/io.py index 8ee2fff01..67c4c4a8c 100644 --- a/pwndbg/dbg/lldb/repl/io.py +++ b/pwndbg/dbg/lldb/repl/io.py @@ -66,7 +66,7 @@ class OpportunisticTerminalControl: if fd == -1: try: fd = os.open("/dev/tty", os.O_RDWR) - except (FileNotFoundError, PermissionError): + except (FileNotFoundError, PermissionError, OSError): # Flop and die. self.supported = False return @@ -403,7 +403,7 @@ class IODriverPseudoTerminal(IODriver): termios.tcsetwinsize(self.manager, size) # novm signal.signal(signal.SIGWINCH, handle_sigwinch) - except FileNotFoundError: + except (FileNotFoundError, PermissionError, OSError): print( "warning: no terminal device in /dev/tty, expect no support for terminal sizes" )