|
|
|
|
|
by Thorrez
2382 days ago
|
|
Here's a Python 2 segfault I ran into recently. import sys, threading, time
t = threading.Thread(target=sys.stdin.read, args=(1,))
t.start()
time.sleep(1)
sys.stdin.close()
Run it then after a few seconds press enter. It doesn't segfault in Python 3, but it still doesn't behave how I'd like, because I would like the close() to unblock the read(), but it doesn't unblock the read(), the read() still hangs until it gets some input. |
|