From d29e0069ba3a757eec3eb7d0cec81fa22fd69119 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Thu, 24 Aug 2017 11:29:19 +0200 Subject: [PATCH] Update terminalManagement --- play zone/terminalManagement | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/play zone/terminalManagement b/play zone/terminalManagement index 9b318828..052f883d 100644 --- a/play zone/terminalManagement +++ b/play zone/terminalManagement @@ -53,10 +53,7 @@ def HandleTerminal(): tty.setraw(0) terminal, p_pid, p_out = open_terminal() std_out = os.fdopen(sys.stdout.fileno(), "w+b", 0) - #termios.tcdrain(p_pid) - #termios.tcdrain(0) while running: - #time.sleep(0.04) r, w, x = select.select([sys.stdin, p_out],[],[]) if r == []: continue @@ -65,9 +62,6 @@ def HandleTerminal(): print('pre p_out') try: msgBytes = read_all(p_out.fileno()) - #msgBytes = p_out.read(65536) - #msgBytes = os.read(p_out.fileno(), 4) - #p_out.read(4096) except (EOFError, OSError): running = False break @@ -82,13 +76,9 @@ def HandleTerminal(): print('pre stdin') try: msgBytes = read_all(sys.stdin.fileno()) - #msgBytes = p_out.read(65536) - #msgBytes = os.read(p_out.fileno(), 4) - #p_out.read(4096) except (EOFError, OSError): running = False break - #msgBytes = os.read(sys.stdin.fileno(), 1) terminal.feed(msgBytes) os.write(p_out.fileno(), msgBytes) if debug: @@ -97,7 +87,6 @@ def HandleTerminal(): print(e) running = False finally: - #termios.tcsetattr(0, termios.TCSADRAIN, attr) os.kill(p_pid, signal.SIGTERM) p_out.close() termios.tcsetattr(sys.stdin, termios.TCSADRAIN, old_attr)