Skip to main content

Module subprocess

Module subprocess 

Source
Expand description

§Subprocess: OS process runner for TaskKind::Subprocess.

Executes tasks by spawning child OS processes with optional backend hardening (rlimits, cgroups, security capabilities).

§Modules

ModuleWhat it does
runnerSubprocessRunner: Runner trait impl + execution
backendSubprocessBackendConfig: rlimits, cgroups, security
taskSubprocessTaskConfig: resolved runtime config
loggerLogConfig + stream capture, truncation, tracing

§Quick start

register_subprocess_runner(&mut router, "my-runner")
    ├──► creates SubprocessRunner::new("my-runner")
    ├──► attaches label "runner-name" = "my-runner"
    └──► registers in RunnerRouter

register_subprocess_runner_with_backend(&mut router, "secure", backend)
    ├──► validates SubprocessBackendConfig
    ├──► creates SubprocessRunner::with_config("secure", backend)
    ├──► attaches label "runner-name" = "secure"
    └──► registers in RunnerRouter

§Registration guard

  • Duplicate runner names are rejected via router.contains_label() check
  • Returns ExecError::DuplicateRunner if a runner with the same name exists

Structs§

LogConfig
Configuration for subprocess output logging.
SubprocessBackendConfig
Low-level OS/kernel configuration for subprocess execution.
SubprocessRunner
Runner that executes TaskKind::Subprocess as OS subprocesses.
SubprocessTaskConfig
Subprocess configuration - fully resolved per-task parameters.

Constants§

LABEL_RUNNER_NAME
Well-known label key used to identify a runner by name.

Functions§

register_subprocess_runner
Register a subprocess runner with default settings.
register_subprocess_runner_with_backend
Register a subprocess runner with explicit runner configuration.