Content-Length: 495447 | pFad | https://github.com/python/cpython/issues/98966

ad subprocess: stdout set to subprocess.STDOUT is incorrectly handled · Issue #98966 · python/cpython · GitHub
Skip to content

subprocess: stdout set to subprocess.STDOUT is incorrectly handled #98966

Description

@ptsneves

Bug report

import subprocess
subprocess.run('true', stdout=subprocess.STDOUT, cwd='./')

Expected output:

  • Some kind of error stating that the stdout argument cannot take a subprocess.STDOUT. That subprocess.STDOUT is only valid for stderr

Actual output:

OSError: [Errno 9] Bad file descriptor: './'

I reproduce this with the latest Python main branch as well as Python 3.10 but I see no indication this issue was ever addressed

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/98966

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy