This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 30596 open xoph, 2022-01-14 10:07
Messages (3)
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.
msg412297 - (view) Author: xoph (xoph) * Date: 2022-02-01 18:11
Created a PR: https://github.com/python/cpython/pull/30596

It's ready for review. Happy about any feedback!
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90522
2022-02-01 18:11:58xophsetmessages: + msg412297
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