pub struct SystemExecutor {
pub max_output_bytes: usize,
}Expand description
Production bounded command runner (literal argv, no shell).
Manager names resolve only through trusted absolute platform paths. The
child environment is cleared; user-scoped systemd receives only explicit
session-bus variables. Stdin is null unless the caller supplies bounded
input. Stdout/stderr are each bounded by max_output_bytes; overflow
fails closed without assuming state. Deadlines kill and reap the child.
The bounded execution itself is delegated to eggup_core::run_bounded;
this type keeps the service’s own pre-flight policy — allowlisted
absolute paths, a cleared environment, a bounded stdin payload, and the
timeout range check — ahead of that call.
Fields§
§max_output_bytes: usizePer-stream output bound.
Implementations§
Source§impl SystemExecutor
impl SystemExecutor
Sourcepub fn with_max_output(max_output_bytes: usize) -> Result<Self, ServiceError>
pub fn with_max_output(max_output_bytes: usize) -> Result<Self, ServiceError>
Creates a runner with an explicit per-stream bound.
§Errors
ServiceError::InvalidInput when the bound is zero or above 16 MiB.