cmd/tailscaled: log on shutdown signal

crawshaw/restartlimit
Brad Fitzpatrick 4 years ago
parent 2072dcc127
commit ff8c8db9d3

@ -153,7 +153,8 @@ func run() error {
interrupt := make(chan os.Signal, 1) interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM) signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM)
select { select {
case <-interrupt: case s := <-interrupt:
logf("tailscaled got signal %v; shutting down", s)
cancel() cancel()
case <-ctx.Done(): case <-ctx.Done():
// continue // continue

Loading…
Cancel
Save