Skip to content

Add runsc kill --pgid#12908

Merged
copybara-service[bot] merged 2 commits intomasterfrom
test/cl897368159
Apr 13, 2026
Merged

Add runsc kill --pgid#12908
copybara-service[bot] merged 2 commits intomasterfrom
test/cl897368159

Conversation

@copybara-service
Copy link
Copy Markdown

Add runsc kill --pgid

Follow up PR of #12739 for adding runsc kill --pgid xxx support.

Changes

Adds a --pgid flag to runsc kill that sends a signal to all processes in a given process group (identified by PGID in the root PID namespace). This complements the existing --pid and --all flags.

The signal is delivered through the existing ContMgrSignal RPC via a new DeliverToProcessGroup delivery mode, following the same container -> sandbox -> loader chain as the other signal modes.

Testing

TestSignalProcessGroup creates a 3-process container (init -> child -> grandchild) where the child calls setpgid to form a new process group shared with the grandchild. The test sends SIGKILL to that PGID and verifies:

  • Both child and grandchild are killed
  • Init (PGID 1) survives

A new task-tree-pgid test app subcommand supports this by spawning a deterministic process tree with a distinct process group.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12905 from danielpfeifer02:dpfeifer/runsc-kill-pgid 7afe641

@copybara-service copybara-service bot added the exported Issue was exported automatically label Apr 9, 2026
@copybara-service copybara-service bot force-pushed the test/cl897368159 branch 3 times, most recently from a55f001 to 9b3668f Compare April 13, 2026 17:29
@copybara-service copybara-service bot merged commit ab52a70 into master Apr 13, 2026
@copybara-service copybara-service bot deleted the test/cl897368159 branch April 13, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants