classification
Title: asyncio subprocess cannot read from /dev/stdin
Type: behavior Stage: patch review
Components: asyncio Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, xoph, yselivanov
Priority: normal Keywords: patch

Created on 2022-01-13 08:18 by xoph, last changed 2022-01-14 10:07 by xoph.

Pull Requests
URL Status Linked Edit
PR 30596 open xoph, 2022-01-14 10:07
Messages (2)
msg410466 - (view) Author: xoph (xoph) * Date: 2022-01-13 08:24
asyncio.create_subprocess_exec and asyncio.create_subprocess_shell fail with "No such device or address" when called on a program that attempts to invoke `/dev/stdin` on Linux.
This happens in contrast to the subprocess module and was discussed in the this thread: https://stackoverflow.com/questions/70624413/how-to-read-from-dev-stdin-with-asyncio-create-subprocess-exec

It seems while subprocess uses a pipe, asyncio uses socket.socketpair() to communicate with the subprocess which in turn appears to fail for `/dev/stdin`
msg410467 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2022-01-13 08:35
True. Would you make a pull request that uses socketpair on AIX only?
A test for desired behavior is required.
History
Date User Action Args
2022-01-14 10:07:52xophsetkeywords: + patch
stage: patch review
pull_requests: + pull_request28794
2022-01-13 08:35:50asvetlovsetmessages: + msg410467
2022-01-13 08:24:51xophsetmessages: + msg410466
2022-01-13 08:18:32xophcreate