process_label_is_protected (process_signal.rs)

clawdstrike · infra

Process tree signal validation and Unix signal helpers. ! ! Rejects unsafe signal targets (pid 0/1, the current agent, its parent, ! and protected system processes), verifies that durable identity bindings ! still match the live pid, and provides Unix `kill`-based signal dispat

// Source: https://github.com/backbay-labs/clawdstrike | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Process tree signal validation and Unix signal helpers.
//!
//! Rejects unsafe signal targets (pid 0/1, the current agent, its parent,
//! and protected system processes), verifies that durable identity bindings
//! still match the live pid, and provides Unix `kill`-based signal dispatch
//! for suspend/resume operations.

use super::*;

pub(super) fn validate_process_signal_targets(targets: &[ProcessSignalTarget]) -> Result<()> {
    if targets.is_empty() {
        return Err(anyhow::anyhow!(
            "process tree has no signalable process nodes"
        ));
    }
    le

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key