mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
#6416: Fix compilation of the select module on Windows, as well as test_subprocess:
PIPE_BUF is not defined on Windows, and probably has no meaning there. Anyway the subprocess module uses another way to perform non-blocking reads (with a thread)
This commit is contained in:
parent
b0c828ae4a
commit
ce32eb7406
4 changed files with 10 additions and 7 deletions
|
@ -418,6 +418,12 @@ else:
|
|||
import fcntl
|
||||
import pickle
|
||||
|
||||
# When select or poll has indicated that the file is writable,
|
||||
# we can write up to _PIPE_BUF bytes without risk of blocking.
|
||||
# POSIX defines PIPE_BUF as >= 512.
|
||||
_PIPE_BUF = getattr(select, 'PIPE_BUF', 512)
|
||||
|
||||
|
||||
__all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call",
|
||||
"check_output", "CalledProcessError"]
|
||||
|
||||
|
@ -426,11 +432,6 @@ try:
|
|||
except:
|
||||
MAXFD = 256
|
||||
|
||||
# When select or poll has indicated that the file is writable,
|
||||
# we can write up to _PIPE_BUF bytes without risk of blocking.
|
||||
# POSIX defines PIPE_BUF as >= 512.
|
||||
_PIPE_BUF = getattr(select, 'PIPE_BUF', 512)
|
||||
|
||||
_active = []
|
||||
|
||||
def _cleanup():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue