fix input_in_time for linux
This commit is contained in:
@@ -377,8 +377,10 @@ class InteractBase(object):
|
|||||||
break
|
break
|
||||||
if time.time() - t > max_time_sec:
|
if time.time() - t > max_time_sec:
|
||||||
break
|
break
|
||||||
p.terminate()
|
p.terminate()
|
||||||
sys.stdin = os.fdopen( sys.stdin.fileno() )
|
old_stdin = sys.stdin
|
||||||
|
sys.stdin = os.fdopen( os.dup(sys.stdin.fileno()) )
|
||||||
|
old_stdin.close()
|
||||||
return inp
|
return inp
|
||||||
|
|
||||||
def input_process_skip_pending(self, stdin_fd):
|
def input_process_skip_pending(self, stdin_fd):
|
||||||
|
|||||||
Reference in New Issue
Block a user