diff --git a/ethermess.py b/ethermess.py index e908f0f..3a3a9c0 100644 --- a/ethermess.py +++ b/ethermess.py @@ -193,8 +193,10 @@ def handle_message(mac, message): print('<%s> %s' % (nick, ascii(line))) def eventloop(proc): - # Create unbuffered version of stdin + # Create unbuffered version of stdin and close the old one as we + # won't need it anymore unbuf_stdin = open(sys.stdin.buffer.fileno(), 'rb', buffering = 0) + sys.stdin.close() # Set up a poll for inputs (but do output blockingly) poll = select.poll()