Skip to content

Commit

Permalink
requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexadhy committed May 31, 2021
1 parent ad3c710 commit 3627ed7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmdutil/signal_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmdutil/signal_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
2 changes: 1 addition & 1 deletion cmdutil/signal_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}

0 comments on commit 3627ed7

Please sign in to comment.