Skip to content

Commit

Permalink
Fix unhandled error and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kvij committed Oct 22, 2023
1 parent 3228434 commit 6ed6cd2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func main() {

for sig := range stop {
if sig == syscall.SIGURG {
// SIGURG is used by Golang for it's own purposes, ignore it as these signals
// SIGURG is used by Golang for its own purposes, ignore it as these signals
// are most likely "junk" from Golang not from K8s/Docker
log(fmt.Sprintf("Received signal '%v', ignoring", sig))
} else if proc == nil {
Expand All @@ -87,7 +87,10 @@ func main() {
} else {
// Proc is not null, so the child process is running and should also receive this signal
log(fmt.Sprintf("Received signal '%v', passing to child", sig))
proc.Signal(sig)
err := proc.Signal(sig)
if err != nil {
log(fmt.Sprintf("Failed passing signal '%v' to child, error: %s", sig, err))
}
}
}
}()
Expand Down

0 comments on commit 6ed6cd2

Please sign in to comment.