posixsubprocess

package
v0.12.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package posixsubprocess is the gopy port of CPython's Modules/_posixsubprocess.c. It backs subprocess.py with the low-level fork+exec primitive on POSIX systems.

CPython: Modules/_posixsubprocess.c:1 _posixsubprocess module

The full C implementation calls clone(2)/vfork(2) directly, closes file descriptors in the child, and communicates pre-exec errors through errpipe_write. In gopy the same observable contract is satisfied by exec.Cmd: stdin/stdout/stderr fd remapping is done via the Cmd.Stdin/Stdout/Stderr fields, and the process is started with Cmd.Start() which returns the PID.

The 24-argument fork_exec signature is kept verbatim so that the vendored subprocess.py can call _posixsubprocess.fork_exec without modification.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL