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
This commit is contained in:
@@ -17,16 +17,17 @@ class TerminalSession:
|
|||||||
|
|
||||||
async def start(self) -> None:
|
async def start(self) -> None:
|
||||||
"""Start the docker exec process with a shell."""
|
"""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(
|
self.process = await asyncio.create_subprocess_exec(
|
||||||
"docker",
|
"docker",
|
||||||
"exec",
|
"exec",
|
||||||
"-i",
|
"-it",
|
||||||
"-e",
|
"-e",
|
||||||
"TERM=xterm",
|
"TERM=xterm",
|
||||||
self.container_id,
|
self.container_id,
|
||||||
"/bin/bash",
|
"bash",
|
||||||
"-i",
|
"-il",
|
||||||
"-l",
|
|
||||||
stdin=asyncio.subprocess.PIPE,
|
stdin=asyncio.subprocess.PIPE,
|
||||||
stdout=asyncio.subprocess.PIPE,
|
stdout=asyncio.subprocess.PIPE,
|
||||||
stderr=asyncio.subprocess.STDOUT,
|
stderr=asyncio.subprocess.STDOUT,
|
||||||
|
|||||||
Reference in New Issue
Block a user