Skip to content

asyncio subprocess cannot read from /dev/stdin #90522

Description

@xopham
mannequin
BPO 46364
Nosy @asvetlov, @1st1, @xopham
PRs
  • bpo-46364: Use sockets only for stdin of asyncio on AIX #30596
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2022-01-13.08:18:32.782>
    labels = ['type-bug', 'expert-asyncio']
    title = 'asyncio subprocess cannot read from /dev/stdin'
    updated_at = <Date 2022-02-01.18:11:58.688>
    user = 'https://github.com/xopham'

    bugs.python.org fields:

    activity = <Date 2022-02-01.18:11:58.688>
    actor = 'xoph'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['asyncio']
    creation = <Date 2022-01-13.08:18:32.782>
    creator = 'xoph'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46364
    keywords = ['patch']
    message_count = 3.0
    messages = ['410466', '410467', '412297']
    nosy_count = 3.0
    nosy_names = ['asvetlov', 'yselivanov', 'xoph']
    pr_nums = ['30596']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue46364'
    versions = []

    Activity

    1. xopham commented on Jan 13, 2022

      xophammannequin
      MannequinAuthor

      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

    2. asvetlov commented on Jan 13, 2022

      @asvetlov
      Contributor

      True. Would you make a pull request that uses socketpair on AIX only?
      A test for desired behavior is required.

    3. xopham commented on Feb 1, 2022

      xophammannequin
      MannequinAuthor

      Created a PR: #30596

      It's ready for review. Happy about any feedback!

    4. transferred this issue fromon Apr 10, 2022
    5. added a commit that references this issue on Jul 18, 2022
    6. added a commit that references this issue on Aug 12, 2022
    7. xopham commented on Aug 19, 2022

      @xopham
      ContributorAuthor

      @1st1 @asvetlov the associated PR is ready, including tests. It's a small change. Would be happy to move this forward and resolve the issue 🙂

    8. added a commit that references this issue on Oct 13, 2022
    9. Repository owner moved this from Todo to Done in asyncioon Oct 13, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      • Status
        Done

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions