Skip to content

Detect QEMU linux-user emulation in subprocess._use_posix_spawn() #131398

Open
@andreas-schwab

Description

@andreas-schwab

The qemu linux-user emulation does not support CLONE_VFORK and emulates it
with a true fork. That breaks posix_spawn because it cannot report errors
back to the parent process. The subprocess modules should detect that is
it being executed in qemu linux-user emulation and return False in
_use_posix_spawn. One way to do that is to look for "uarch *: qemu" in
/proc/cpuinfo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-unsupportedstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions