Revert "cmd/tailscaled: exit gracefully on SIGPIPE"

tailscaled receives a SIGPIPE when CLIs disconnect from it. We shouldn't
shut down in that case.

This reverts commit 43b271cb26.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2020-08-01 02:07:14 +00:00
committed by Dave Anderson
parent 358cd3fd92
commit d64de1ddf7
2 changed files with 10 additions and 9 deletions

View File

@@ -148,11 +148,10 @@ func run() error {
ctx, cancel := context.WithCancel(context.Background())
// Exit gracefully by cancelling the ipnserver context in most common cases:
// interrupted from the TTY (including when output is piped into e.g. grep)
// or killed by a service manager.
// interrupted from the TTY or killed by a service manager.
go func() {
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, syscall.SIGINT, syscall.SIGPIPE, syscall.SIGTERM)
signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM)
select {
case s := <-interrupt:
logf("tailscaled got signal %v; shutting down", s)