better buffer for pty

This commit is contained in:
Chrys 2019-08-24 21:51:11 +02:00
parent ecacae23d0
commit f70cb1670e

View File

@ -177,7 +177,7 @@ class driver(screenDriver):
# input
if sys.stdin in r:
try:
msgBytes = self.readAll(sys.stdin.fileno())
msgBytes = self.readAll(sys.stdin.fileno(), len=4096)
except (EOFError, OSError):
active.value = False
break
@ -203,7 +203,7 @@ class driver(screenDriver):
eventQueue.put({"Type":fenrirEventType.ScreenUpdate,
"Data":screen_utils.createScreenEventData(self.terminal.GetScreenContent())
})
self.injectTextToScreen(msgBytes, screen=sys.stdout.fileno(),)
self.injectTextToScreen(msgBytes, screen=sys.stdout.fileno())
except Exception as e: # Process died?
print(e)
active.value = False