Skip to content

Forward signals to exec subprocess groups#2209

Open
puneetdixit200 wants to merge 1 commit into
getsops:mainfrom
puneetdixit200:fix-exec-signal-forwarding
Open

Forward signals to exec subprocess groups#2209
puneetdixit200 wants to merge 1 commit into
getsops:mainfrom
puneetdixit200:fix-exec-signal-forwarding

Conversation

@puneetdixit200

Copy link
Copy Markdown

Summary

  • run foreground exec-env and exec-file subprocesses in a new Unix process group
  • forward SIGHUP, SIGINT, SIGTERM, and SIGQUIT to the child process group while waiting for it to exit
  • keep Windows behavior unchanged and add a Unix regression test for SIGTERM forwarding

Closes #840

Testing

  • GOCACHE=/tmp/sops-840-gocache GOMODCACHE=/tmp/sops-840-gomodcache go test ./cmd/sops/subcommand/exec
  • GOCACHE=/tmp/sops-840-gocache GOMODCACHE=/tmp/sops-840-gomodcache go vet ./...
  • GOCACHE=/tmp/sops-840-gocache GOMODCACHE=/tmp/sops-840-gomodcache go test $(go list ./... | rg -v '/(hcvault|kms|pgp)$')
  • GOCACHE=/tmp/sops-840-gocache GOMODCACHE=/tmp/sops-840-gomodcache go test ./... fails locally because Docker is not available for hcvault/kms tests and gpg is not installed for pgp tests

Signed-off-by: Deepak kudi <deepakkudi23@adsl-172-10-9-116.dsl.sndg02.sbcglobal.net>
@puneetdixit200 puneetdixit200 force-pushed the fix-exec-signal-forwarding branch from 61e88ac to 8f5b9a9 Compare June 4, 2026 07:59
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.

exec-env/exec-file signal handling might be broken

1 participant