diff --git a/apps/api/src/services/terminal_session.py b/apps/api/src/services/terminal_session.py index 76ec714..d4e504e 100644 --- a/apps/api/src/services/terminal_session.py +++ b/apps/api/src/services/terminal_session.py @@ -5,7 +5,6 @@ import logging import os import pty import select -import signal import struct import fcntl import time @@ -84,7 +83,7 @@ class TerminalSession: self.last_activity = time.time() def _set_terminal_size(self, cols: int, rows: int) -> None: - """Set the terminal size using TIOCSWINSZ and signal docker exec.""" + """Set the terminal size using TIOCSWINSZ.""" if self._master_fd is None: logger.warning("Cannot resize: master_fd is None (session not started)") return @@ -94,15 +93,6 @@ class TerminalSession: try: fcntl.ioctl(self._master_fd, TIOCSWINSZ, size) logger.info(f"Resized PTY to {cols}x{rows} (fd={self._master_fd})") - - # Send SIGWINCH to docker exec process so it re-reads terminal - # size and propagates it to the container's PTY - if self.process and self.process.pid: - try: - os.kill(self.process.pid, signal.SIGWINCH) - logger.info(f"Sent SIGWINCH to docker exec pid={self.process.pid}") - except (OSError, ProcessLookupError) as e: - logger.warning(f"Failed to send SIGWINCH: {e}") except (OSError, IOError) as e: logger.error(f"Failed to resize PTY: {e}")