From 33bdc2fc3235b52596bc097a3a4f021f9e72cc22 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 2 Feb 2018 15:35:35 -0500 Subject: [PATCH] util: Call set_nonblock() in create_pty() Signed-off-by: Kevin O'Connor --- klippy/util.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/klippy/util.py b/klippy/util.py index 4a528439..a8add833 100644 --- a/klippy/util.py +++ b/klippy/util.py @@ -30,8 +30,7 @@ def create_pty(ptyname): except os.error: pass os.symlink(os.ttyname(sfd), ptyname) - fcntl.fcntl(mfd, fcntl.F_SETFL - , fcntl.fcntl(mfd, fcntl.F_GETFL) | os.O_NONBLOCK) + set_nonblock(mfd) old = termios.tcgetattr(mfd) old[3] = old[3] & ~termios.ECHO termios.tcsetattr(mfd, termios.TCSADRAIN, old)