About this project
running-process is a cross-platform operating-system process runtime written in Rust with first-class Python bindings. It provides a unified abstraction over process creation, pipes, PTYs, process trees, containment, observation, detached daemons, and brokered long-lived services.
The library addresses the non-portable nature of OS process behavior across platforms — Windows Job Objects and ConPTY, Unix process groups and signals, Linux ptrace tracing, named pipes, child reaping, and terminal control all have different lifetime and failure rules. running-process encapsulates these in a Rust core exposed through both Rust APIs and Pythonic sync/asyncio surfaces.
Key capabilities include:
- Commands and streams: concurrent stdout/stderr capture, bounded waits, typed exits, text and bytes handling.
- Interactive terminals: native PTYs on Windows (ConPTY), Linux, and macOS with expect rules, input relay, resize, interrupt, and idle detection.
- Process-tree lifetime: containment, recursive terminate/kill, descendant cleanup, originator tagging, and zombie-aware tracking.
- Observation: lifecycle events, process watches, exact Linux tree tracing via ptrace, stack captures, and explicit loss records.
- Durable execution: detached launch, daemon lifecycle, broker negotiation, session relay, health probes, and admin diagnostics.
- Operator tooling: supervision CLI, cleanup manifests, terminal capability detection, and process dashboard.
The Python package is not a separate reimplementation — its bindings call the same Rust process engine used by native consumers. Basic APIs like subprocess_run, RunningProcess, InteractiveProcess, and ContainedProcessGroup work without any broker or daemon setup. The daemon/broker framework is available for supervised, cross-session process management.
On Windows 10, the library transparently fetches and caches a ConPTY sidecar for modern terminal behavior, with SHA-256 verification and offline fallback to kernel32. Terminal graphics capability detection (Sixel, Kitty, iTerm2) is available for Rust callers.
A CLI wrapper provides supervised command execution with inactivity and wall-clock timeouts, tree termination, and leak detection. A cleanup utility reads broker cache manifests for pruning dormant daemon roots.
The library is proven in Soldr, which uses it as its process creation boundary and daemon/broker foundation. It is distributed on PyPI and Crates.io with CI covering Linux, macOS, and Windows.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.