# os/kill Send a signal by name to a process id. Accepts the catchable `os/on-signal` set plus `:sigkill` and `:sigstop` (send-only — the kernel never delivers those to a handler). ## Syntax
[os/kill $pid $signal]
## Parameters - `$pid` — target process id (number; i32 range, negative selects a process group as in `kill(2)`) - `$signal` — keyword or string; case-insensitive, optional `sig` prefix (`:sigusr1`, `"usr1"`, `"SIGUSR1"`, `:usr1` all work) ## Examples
[os/kill [os/pid] :sigusr1]      # → true (self-send for testing)
[os/kill 99999999 :sigusr1]      # → %Err{:message "os/kill: ProcessNotFound"}
[os/kill [os/pid] :nosuchsignal] # → %Err{:message "os/kill: unknown signal"}
[os/kill "self" :sigusr1]        # → %Err{:message "os/kill: pid must be a number"}
## Returns `true` on success; `%Err{:message}` for a bad pid/signal, a nonexistent process, or lack of permission. Never self-send a signal that has no live handler — its default disposition then applies and often terminates the process. ## See Also `os/on-signal`, `os/off-signal`, `os/signals`, `os/pid`