Skip to content

runsc ps: Add process group ID (PGID) to output#12890

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl896146844
Open

runsc ps: Add process group ID (PGID) to output#12890
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl896146844

Conversation

@copybara-service
Copy link
Copy Markdown

runsc ps: Add process group ID (PGID) to output

Add the process group ID (PGID) field to the Process struct and populate it using the existing kernel ProcessGroup API. The PGID is now displayed in a new JSON-full output of runsc ps.

The JSON-full output format is making fields like PGID, PPID, UID, and command name available to callers in a JSON format but keeping the original JSON format the same for backwards compatibility.

This enables container runtimes to discover process group IDs from outside the sandbox without needing to exec into the container, which is useful for sending signals to entire process groups via runsc kill when the container may be under memory pressure.
I am planning to add a follow-up PR enabling the functionality of running runsc kill --pgid xxx.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12739 from danielpfeifer02:dpfeifer/runsc-ps-pgid 27f59b4

Add the process group ID (PGID) field to the Process struct and populate it using the existing kernel ProcessGroup API. The PGID is now displayed in a new JSON-full output of `runsc ps`.

The JSON-full output format is making fields like PGID, PPID, UID, and command name available to callers in a JSON format but keeping the original JSON format the same for backwards compatibility.

This enables container runtimes to discover process group IDs from outside the sandbox without needing to exec into the container, which is useful for sending signals to entire process groups via `runsc kill` when the container may be under memory pressure.
I am planning to add a follow-up PR enabling the functionality of running `runsc kill --pgid xxx`.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12739 from danielpfeifer02:dpfeifer/runsc-ps-pgid 27f59b4
PiperOrigin-RevId: 896146844
@copybara-service copybara-service bot added the exported Issue was exported automatically label Apr 7, 2026
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.

1 participant