diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/krino/sort.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/krino/sort.go b/cmd/krino/sort.go index 901b19e..52875ed 100644 --- a/cmd/krino/sort.go +++ b/cmd/krino/sort.go @@ -359,7 +359,13 @@ func installSignalHandler(cancel context.CancelFunc) func() { } sig := make(chan os.Signal, 1) - signal.Notify(sig, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP) + signal.Notify(sig, os.Interrupt, syscall.SIGTERM) + // A hangup stops krino like SIGTERM - unless it was started ignoring + // hangups (nohup), which must go on meaning "keep running" (re-review + // pa F3): asking for SIGHUP would re-enable it. + if !signal.Ignored(syscall.SIGHUP) { + signal.Notify(sig, syscall.SIGHUP) + } done := make(chan struct{}) go func() { signals := 0 |
