Skip to content

Commit

Permalink
Merge pull request #34 from n-e/do-not-forward-sigurg
Browse files Browse the repository at this point in the history
Do not forward SIGURG to the child process
  • Loading branch information
alexei-led authored Sep 6, 2023
2 parents 35bb1a2 + 10faccf commit 6b56dca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,12 @@ func run(ctx context.Context, provider secrets.Provider, commandSlice []string)
// Goroutine for signals forwarding
go func() {
for sig := range sigs {
// ignore SIGCHLD signals since these are only useful for secrets-init
if sig != syscall.SIGCHLD {
// ignore:
// - SIGCHLD signals, since these are only useful for secrets-init
// - SIGURG signals, since they are used internally by the secrets-init
// go runtime (see https://github.com/golang/go/issues/37942) and are of
// no interest to the child process
if sig != syscall.SIGCHLD && sig != syscall.SIGURG {
// forward signal to the main process and its children
e := syscall.Kill(-cmd.Process.Pid, sig.(syscall.Signal))
if e != nil {
Expand Down

0 comments on commit 6b56dca

Please sign in to comment.