aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorChristoph Hamsen <37963496+xopham@users.noreply.github.com>2022-10-13 18:11:15 +0200
committerGitHub <noreply@github.com>2022-10-13 09:11:15 -0700
commitc9ed0327a9c741a1808926b409df29467baf303a (patch)
tree335ba2d41d380c2b3ccbc341db55e1f8622b6178 /Lib/asyncio/unix_events.py
parentd4b91663857e85eab1f309cacec4d27b5f6657ec (diff)
downloadcpython-c9ed0327a9c741a1808926b409df29467baf303a.tar.gz
cpython-c9ed0327a9c741a1808926b409df29467baf303a.zip
bpo-46364: Use sockets for stdin of asyncio only on AIX (#30596)
Signed-off-by: Christoph Hamsen <hamsen.christoph@posteo.de> Co-authored-by: July Tikhonov <july.tikh@gmail.com>
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index bdffc032e31..9f9b03e0cb2 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -800,12 +800,11 @@ class _UnixSubprocessTransport(base_subprocess.BaseSubprocessTransport):
def _start(self, args, shell, stdin, stdout, stderr, bufsize, **kwargs):
stdin_w = None
- if stdin == subprocess.PIPE:
- # Use a socket pair for stdin, since not all platforms
+ if stdin == subprocess.PIPE and sys.platform.startswith('aix'):
+ # Use a socket pair for stdin on AIX, since it does not
# support selecting read events on the write end of a
# socket (which we use in order to detect closing of the
- # other end). Notably this is needed on AIX, and works
- # just fine on other platforms.
+ # other end).
stdin, stdin_w = socket.socketpair()
try:
self._proc = subprocess.Popen(