Skip to content

Commit

Permalink
try sigterm instead of sighup
Browse files Browse the repository at this point in the history
  • Loading branch information
voigt committed May 20, 2024
1 parent cd16a63 commit c76feb2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/containerd/restart_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ func (c restarter) Restart() error {
}
slog.Debug("found containerd process", "pid", pid)

err = syscall.Kill(pid, syscall.SIGHUP)

err = syscall.Kill(pid, syscall.SIGTERM)
if err != nil {
return fmt.Errorf("failed to send SIGHUP to containerd: %w", err)
return fmt.Errorf("failed to send SIGTERM to containerd: %w", err)
}
return nil
}
Expand All @@ -56,7 +55,7 @@ func getPid() (int, error) {
return 0, fmt.Errorf("could not get processes: %w", err)
}

var containerdProcesses = []ps.Process{}
containerdProcesses := []ps.Process{}

for _, process := range processes {
if process.Executable() == "containerd" {
Expand Down

0 comments on commit c76feb2

Please sign in to comment.