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 containment::ContainedProcessGroup;
pub use containment::ORIGINATOR_ENV_VAR;
pub use content_hash::blake3_file;
pub use observer::CapabilitySupport;
pub use observer::CaptureSource;
pub use observer::CategoryCapability;
pub use observer::DumpResult;
pub use observer::EventCategory;
pub use observer::ObservationGrade;
pub use observer::ObservationPolicy;
pub use observer::ObserverCapabilities;
pub use observer::ObserverConfig;
pub use observer::ObserverEvent;
pub use observer::ObserverEventKind;
pub use observer::ObserverSubscriber;
pub use observer::ProcessEvent;
pub use observer::ProcessEventKind;
pub use observer::ProcessIdentity;
pub use observer::ProcessObservation;
pub use observer::ProcessObservationCapabilities;
pub use observer::ProcessObservationError;
pub use observer::ProcessWatch;
pub use observer::ProcessWatchConfigurationError;
pub use observer::ProcessWatchCursor;
pub use observer::ProcessWatchGap;
pub use observer::ProcessWatchLoss;
pub use observer::ProcessWatchMatch;
pub use observer::ProcessWatchRead;
pub use observer::ProcessWatchSubscriber;
pub use observer::StackCapture;
pub use observer::StackDump;
pub use output_log::CursorRead;
pub use output_log::OutputCursor;
pub use output_log::OutputLog;
pub use output_log::OutputRecord;
pub use output_log::SharedOutputCursor;
pub use output_log::SharedOutputLog;
pub use spawn::spawn;
pub use spawn::spawn_daemon;
pub use spawn::spawn_daemon_breaking_away_from_job;
pub use spawn::spawn_daemon_breaking_away_with_env_policy;
pub use spawn::spawn_daemon_with_clear_env;
pub use spawn::spawn_daemon_with_env_policy;
pub use spawn::spawn_daemon_with_stdio;
pub use spawn::spawn_daemon_with_stdio_and_env_policy;
pub use spawn::spawn_with_env_policy;
pub use spawn::EnvironmentPolicy;
pub use spawn::DAEMON_MARKER_ENV_VAR;
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;
pub use window_icon::host_icon_support;
pub use window_icon::icon_support;
pub use window_icon::set_host_icon;
pub use window_icon::set_icon;
pub use window_icon::IconError;
pub use window_icon::IconScope;
pub use window_icon::IconSource;
pub use window_icon::IconSupport;
pub use window_icon::StockIcon;

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
Console-popup observation through the selected platform process facade.
containment
Process group with originator-env injection that delegates to the two-mode crate::spawn() surface.
content_hash
Content-hash primitive: blake3 of a file’s bytes (#891).
environment
Process environment baselines.
maintenance
Maintenance subcommands exposed via the runpm CLI.
observer
Phase 1 of #221: the process-observation capability model and the portable process-lifecycle baseline.
output_log
Bounded append-only output retention and independent reader cursors.
process_tree
Portable facade for local process-tree termination.
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.
window_icon
Public policy for setting the host console/terminal window icon (#577).

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§

ConsoleWindowInfo
Metadata about one visible window observed by console-popup monitoring.
DaemonChild
Handle for a detached child that is not terminated when dropped.
DaemonStdio
Caller-supplied output bindings for a detached synchronous child.
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.
SpawnStdio
Caller-supplied stdio bindings for a contained synchronous child.
SpawnedChild
Handle and optional parent pipe ends for a contained child.
StreamEvent
One captured line or chunk tagged with its source stream.

Enums§

CommandSpec
Command representation used by ProcessConfig.
DaemonStdioSource
Output destination accepted by the detached-child path.
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.
StdioSource
Standard-stream source or destination for a contained child.
StreamKind
Output stream selector used by process read and capture APIs.
UnixSignal

Functions§

current_executable_build_id
Return the GNU build ID of the running executable without reading the executable from disk.
render_rust_debug_traces
Render all non-empty thread debug stacks.
run_command
Run a command to completion while concurrently draining stdout and stderr.
run_command_bounded
Run a command with an aggregate stdout/stderr capture limit.
run_std_command_bounded
Run an existing std::process::Command with bounded capture.
unix_set_priority
unix_signal_process
unix_signal_process_group