From 6e597b9e2135c56707f947559830c7be465af950 Mon Sep 17 00:00:00 2001 From: Fusion Date: Thu, 21 May 2026 11:39:14 +0200 Subject: [PATCH] fix(terminal): allocate proper TTY for docker exec - Change docker exec -i to -it for real TTY allocation - Fixes ioctl errors and job control warnings in terminal - Gives bash a proper terminal for interactive use Quality gates: manually tested --- apps/api/src/services/terminal_session.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/api/src/services/terminal_session.py b/apps/api/src/services/terminal_session.py index dc50a68..adbbd79 100644 --- a/apps/api/src/services/terminal_session.py +++ b/apps/api/src/services/terminal_session.py @@ -17,16 +17,17 @@ class TerminalSession: async def start(self) -> None: """Start the docker exec process with a shell.""" + # Use docker exec -it to allocate a proper TTY + # This gives bash a real terminal and avoids ioctl/job control errors self.process = await asyncio.create_subprocess_exec( "docker", "exec", - "-i", + "-it", "-e", "TERM=xterm", self.container_id, - "/bin/bash", - "-i", - "-l", + "bash", + "-il", stdin=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.STDOUT,