fix(#2284): replace nixos-container kill with machinectl kill SIGKILL
nixos-container has no kill verb. The KillContainer priv request was calling nixos-container kill which always fails. Replace with: machinectl kill <name> --signal=SIGKILL which sends SIGKILL to all processes in the container — the correct semantics for a forced shutdown (called after graceful stop has been attempted). Add a machinectl_run helper alongside container_run so callers stay consistent.
This commit is contained in:
parent
c7c156e57b
commit
fa944d1213
2 changed files with 35 additions and 2 deletions
|
|
@ -230,7 +230,8 @@ pub enum PrivRequest {
|
|||
/// `nixos-container stop <name>`
|
||||
StopContainer { name: String },
|
||||
|
||||
/// `nixos-container kill <name>`
|
||||
/// `machinectl kill <name> --signal=SIGKILL` — force-kills all processes
|
||||
/// in the container. nixos-container has no kill verb.
|
||||
KillContainer { name: String },
|
||||
|
||||
/// `nixos-container update <name> --flake <flake_ref>`
|
||||
|
|
|
|||
Loading…
Reference in a new issue