Skip to main content

Module kill

Module kill 

Source
Expand description

Implementation of the kill sub-command.

Signals supported: TERM, INT, KILL (case-insensitive).

Signal mapping on Windows: TERM → TerminateJobObject (graceful intent; Windows has no SIGTERM, so tree termination is the closest equivalent) INT → TerminateJobObject (same; Windows has no SIGINT for arbitrary PIDs) KILL → TerminateJobObject (forced; semantically the same on Windows)

  • → TerminateJobObject (unknown signals treated as KILL per design.md)

On Windows the supervisor records a windows_job_name in state.json. When present, kill opens that named Job Object directly and terminates it, which stops the entire process tree. If absent (e.g. the supervisor could not assign the process to a job), a snapshot-based tree enumeration fallback is used instead.

Structs§

KillOpts
Options for the kill sub-command.

Functions§

execute
Execute kill: send signal and emit JSON.