Skip to content

Commit

Permalink
fix: handle sigkill as well
Browse files Browse the repository at this point in the history
  • Loading branch information
faiq committed Aug 28, 2024
1 parent 8dc7fd4 commit 8f7a831
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/konvoy-image-wrapper/cmd/create-package-bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func startContainer(containerEngine, containerImage,
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM, syscall.SIGKILL)
defer signal.Stop(c)
go func() {
for sig := range c {
Expand Down
7 changes: 6 additions & 1 deletion cmd/konvoy-image-wrapper/cmd/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,12 @@ func (r *Runner) dockerRun(args []string) error {
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
signal.Notify(
c,
syscall.SIGINT,
syscall.SIGTERM,
syscall.SIGKILL,
)
defer signal.Stop(c)
go func() {
for sig := range c {
Expand Down

0 comments on commit 8f7a831

Please sign in to comment.