Skip to content

exec: forward signals to the exec session's process group - #29525

Open
sahilnyk wants to merge 1 commit into
podman-container-tools:mainfrom
sahilnyk:exec-sigproxy-pgid
Open

exec: forward signals to the exec session's process group#29525
sahilnyk wants to merge 1 commit into
podman-container-tools:mainfrom
sahilnyk:exec-sigproxy-pgid

Conversation

@sahilnyk

Copy link
Copy Markdown
Contributor

Fixes: #19486

Killing podman exec left the command it started running inside the container, because the signal was never passed on.

It now signals the process group of the exec'd command. The kernel already puts that command and its children in one group, so there is no process tree to walk.

podman exec --no-session had the same bug and is fixed too.

Tested on runc and crun, rootless and rootful. The new case in 032-sig-proxy.bats fails without this change.

Checklist

  • I have read and understood our contributing guidelines and will not have more than two open PRs as a new contributor.
  • PR description, commit message, and GitHub comments are human-written, per LLM Policy
  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all commits (git commit -s). The author email must match the sign-off email address. See CONTRIBUTING.md.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

Fixed a bug where killing `podman exec` would leave the command it started running inside the container.

Fixes: podman-container-tools#19486
Signed-off-by: Sahil Nayak <contactsahilpnayak@gmail.com>
@sahilnyk
sahilnyk force-pushed the exec-sigproxy-pgid branch from 1147aab to 2ae8cf4 Compare August 14, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Processes started by podman exec may continue to run after podman exec terminates

1 participant