diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-07-09 22:37:22 +0000 |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-07-09 22:37:22 +0000 |
commit | ce32eb7406baf7a51f7764a7c6ce245dd99dabe9 (patch) | |
tree | df9d9312bf0cbf7d2dd962e4b8d2299640af24b5 /Lib/subprocess.py | |
parent | b0c828ae4a18591b135357c47b1baeecb02f3a5e (diff) | |
download | cpython-git-ce32eb7406baf7a51f7764a7c6ce245dd99dabe9.tar.gz |
#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)
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index c8dcb56e21..a5bb65065a 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -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(): |