Close sys.stdin after we create the unbuffered version
This commit is contained in:
parent
78865bdc8e
commit
d1a6bd7052
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue