Skip to content

Commit 84a8c04

Browse files
hyperrealistHiran Wijesinghe
authored andcommitted
force line buffering with stdbuff
1 parent e751fc1 commit 84a8c04

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/stdio_socket/expose.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ async def _expose_stdio_async(
5050
command: str, socket_path: Path, ptty: bool, stdin: bool, ctrl_d: bool
5151
):
5252
os.system("stty -echo raw")
53+
54+
# force line buffering
55+
command = f"stdbuf -oL -eL {command}"
56+
5357
if ptty:
5458
# these stty settings and psuedo-tty make bash and vim work
5559
command = f'pptty "{command}"'

0 commit comments

Comments
 (0)