Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2991)

Unified Diff: client/cmd/logdog_butler/main.go

Issue 2114253002: LogDog Butler: Catch SIGTERM on Linux. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/cmd/logdog_butler/main_posix.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cmd/logdog_butler/main.go
diff --git a/client/cmd/logdog_butler/main.go b/client/cmd/logdog_butler/main.go
index 2d2ff0373880e684db9b46ae7da72ab45e29fe99..f7dca5e3a6b5a62699456735d217055a31d92262 100644
--- a/client/cmd/logdog_butler/main.go
+++ b/client/cmd/logdog_butler/main.go
@@ -259,10 +259,12 @@ func mainImpl(ctx context.Context, argv []string) int {
// Signal handler to catch 'Control-C'. This will gracefully shutdown the
// butler the first time a signal is received. It will die abruptly if the
// signal continues to be received.
+ //
+ // The specific signals used here are OS-specific.
a.ncCtx = a.Context
a.Context, a.cancelFunc = context.WithCancel(a.Context)
signalC := make(chan os.Signal, 1)
- signal.Notify(signalC, os.Interrupt)
+ signal.Notify(signalC, interruptSignals...)
go func() {
signalled := false
for range signalC {
« no previous file with comments | « no previous file | client/cmd/logdog_butler/main_posix.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698