Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove os.Kill in signal handling #16111

Merged
merged 1 commit into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/jobservice/runtime/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (bs *Bootstrap) LoadAndRun(ctx context.Context, cancel context.CancelFunc)

// Listen to the system signals
sig := make(chan os.Signal, 1)
signal.Notify(sig, os.Interrupt, syscall.SIGTERM, os.Kill)
signal.Notify(sig, os.Interrupt, syscall.SIGTERM)
terminated := false
go func(errChan chan error) {
defer func() {
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/scan/rest/v1/client_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (bcp *basicClientPool) deadCheck(key string, item *poolItem) {
// As we do not have a global context, let's watch the system signal to
// exit the goroutine correctly.
sig := make(chan os.Signal, 1)
signal.Notify(sig, os.Interrupt, syscall.SIGTERM, os.Kill)
signal.Notify(sig, os.Interrupt, syscall.SIGTERM)

tk := time.NewTicker(bcp.config.DeadCheckInterval)
defer tk.Stop()
Expand Down