diff --git a/cmdutil/signal_context.go b/cmdutil/signal_context.go index 14aa87a00..56291a482 100644 --- a/cmdutil/signal_context.go +++ b/cmdutil/signal_context.go @@ -17,8 +17,8 @@ func SignalContext(ctx context.Context, log logrus.FieldLogger) (context.Context ctx, cancel := context.WithCancel(ctx) ch := make(chan os.Signal) - ignoredSigs := ignoreSignals() - signal.Notify(ch, ignoredSigs...) + listenSigs := listenSignals() + signal.Notify(ch, listenSigs...) go func() { select { diff --git a/cmdutil/signal_unix.go b/cmdutil/signal_unix.go index b74f1d87d..c2978a761 100644 --- a/cmdutil/signal_unix.go +++ b/cmdutil/signal_unix.go @@ -8,6 +8,6 @@ import ( "golang.org/x/sys/unix" ) -func ignoreSignals() []os.Signal { +func listenSignals() []os.Signal { return []os.Signal{unix.SIGINT, unix.SIGTERM, unix.SIGQUIT} } diff --git a/cmdutil/signal_windows.go b/cmdutil/signal_windows.go index 107296865..4dff9d835 100644 --- a/cmdutil/signal_windows.go +++ b/cmdutil/signal_windows.go @@ -8,6 +8,6 @@ import ( "golang.org/x/sys/windows" ) -func ignoreSignals() []os.Signal { +func listenSignals() []os.Signal { return []os.Signal{windows.SIGINT, windows.SIGTERM, windows.SIGQUIT} }