Skip to main content

Crate running_process

Crate running_process 

Source
Expand description

Cross-platform process execution, process-tree control, PTY handling, and broker integration primitives.

The crate exposes a synchronous process API through NativeProcess, a contained process-group helper through ContainedProcessGroup, low-level spawn helpers through spawn() and spawn_daemon, and optional daemon/broker modules behind feature flags.

Re-exports§

pub use console_detect::monitor_console_windows;
pub use console_detect::ConsoleWindowInfo;
pub use containment::ContainedProcessGroup;
pub use containment::ORIGINATOR_ENV_VAR;
pub use observer::CapabilitySupport;
pub use observer::CategoryCapability;
pub use observer::EventCategory;
pub use observer::ObserverCapabilities;
pub use observer::ObserverConfig;
pub use observer::ObserverEvent;
pub use observer::ObserverEventKind;
pub use observer::ObserverSubscriber;
pub use spawn::spawn;
pub use spawn::spawn_daemon;
pub use spawn::spawn_daemon_with_clear_env;
pub use spawn::DaemonChild;
pub use spawn::SpawnStdio;
pub use spawn::SpawnedChild;
pub use spawn::StdioSource;
pub use terminal_graphics::current_terminal_capabilities;
pub use terminal_graphics::current_terminal_capabilities_with_timeout;
pub use terminal_graphics::detect_terminal_capabilities;
pub use terminal_graphics::CapabilityStatus;
pub use terminal_graphics::EvidenceStrength;
pub use terminal_graphics::GraphicsCapability;
pub use terminal_graphics::GraphicsProtocol;
pub use terminal_graphics::TerminalCapabilities;
pub use terminal_graphics::TerminalCapabilityInput;
pub use terminal_graphics::TerminalGraphicsCapabilities;
pub use terminal_graphics::TerminalProbeEvidence;

Modules§

boot_autostart
Per-OS boot autostart for the runpm daemon (Phase 4 of #222 — #427).
broker
v1 broker module — schemas are FROZEN FOREVER once v1.0 ships.
cleanup
Standalone cleanup support for v1 broker CacheManifest files.
client
Synchronous IPC client for the running-process daemon.
console_detect
Windows console popup detection using the Win32 EnumWindows API.
containment
Process group with originator-env injection that delegates to the two-mode crate::spawn() surface.
maintenance
Maintenance subcommands exposed via the runpm CLI.
observer
Phase 1 of #221: the process-observation capability model and the portable process-lifecycle baseline.
proto
Prost-generated daemon protocol types used by the client transport.
pty
PTY-backed process APIs.
runpm_config
TOML config file parsing for the runpm PM2-style supervisor CLI.
spawn
Two-mode process spawning. Free functions only — no module-internal traits.
systemd_killmode
systemd KillMode=control-group detection (#391, part of #354).
terminal_graphics
Terminal graphics capability detection and reporting.

Macros§

register_payload_protocol
Define a consumer payload-protocol constant with compile-time checks.
rp_rust_debug_scope
Create a scoped Rust debug trace label for the current function body.

Structs§

NativeProcess
A cross-platform child process with optional output capture.
ProcessConfig
Configuration for crate::NativeProcess.
RunOutput
Captured output and exit status returned by one-shot process helpers.
RustDebugScopeGuard
RAII guard that records one debug frame for the current thread.
StreamEvent
One captured line or chunk tagged with its source stream.

Enums§

CommandSpec
Command representation used by ProcessConfig.
ProcessError
Error returned by process lifecycle and I/O operations.
ReadStatus
Result of a bounded process read operation.
StderrMode
Stderr handling for a spawned process.
StdinMode
Stdin behavior for a spawned process.
StreamKind
Output stream selector used by process read and capture APIs.
UnixSignal

Functions§

render_rust_debug_traces
Render all non-empty thread debug stacks.
run_command
Run a command to completion while concurrently draining stdout and stderr.
unix_set_priority
unix_signal_process
unix_signal_process_group