Closed
Description
Bug report
Bug description:
sys.stdin.read() throws a TypeError if stdin has been set to be non-blocking. The code below should just exit without issue. It throws a TypeError if no input is provided.
#!/usr/bin/python3
import sys
import os
os.set_blocking(sys.stdin.fileno(), False)
sys.stdin.read()
CPython versions tested on:
3.11
Operating systems tested on:
Linux