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

Unified Diff: client/cmd/logdog_butler/main_posix.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 | « client/cmd/logdog_butler/main.go ('k') | client/cmd/logdog_butler/main_windows.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cmd/logdog_butler/main_posix.go
diff --git a/client/cmd/logdog_butler/streamserver_posix.go b/client/cmd/logdog_butler/main_posix.go
similarity index 87%
rename from client/cmd/logdog_butler/streamserver_posix.go
rename to client/cmd/logdog_butler/main_posix.go
index eb2b2dba155d947d87d690f32db04a6db13320c7..44d76c7db86e520aadb33b6cfc8e3f6f00ff2a4a 100644
--- a/client/cmd/logdog_butler/streamserver_posix.go
+++ b/client/cmd/logdog_butler/main_posix.go
@@ -9,6 +9,8 @@ package main
import (
"errors"
"fmt"
+ "os"
+ "syscall"
"github.com/luci/luci-go/client/internal/logdog/butler/streamserver"
"golang.org/x/net/context"
@@ -19,6 +21,13 @@ const (
exampleStreamServerURI = streamServerURI("unix:/var/run/butler.sock")
)
+// interruptSignals is the set of signals to handle gracefully (e.g., flush,
+// shutdown).
+var interruptSignals = []os.Signal{
+ os.Interrupt,
+ syscall.SIGTERM,
+}
+
type streamServerURI string
func (u streamServerURI) Parse() (string, error) {
« no previous file with comments | « client/cmd/logdog_butler/main.go ('k') | client/cmd/logdog_butler/main_windows.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698