diff --git a/eventkitd/listener/listener.go b/eventkitd/listener/listener.go index 12a4929..1f4fed9 100644 --- a/eventkitd/listener/listener.go +++ b/eventkitd/listener/listener.go @@ -57,7 +57,7 @@ func ProcessPackages(workers int, PCAPIface string, address string, metricsAddre } eg.Go(func() error { sigusr := make(chan os.Signal, 1) - signal.Notify(sigusr, syscall.SIGUSR1) + signal.Notify(sigusr, signalPrintStack) defer done() for { diff --git a/eventkitd/listener/signal_fallback.go b/eventkitd/listener/signal_fallback.go new file mode 100644 index 0000000..3915522 --- /dev/null +++ b/eventkitd/listener/signal_fallback.go @@ -0,0 +1,7 @@ +//go:build !unix + +package listener + +import "syscall" + +var signalPrintStack = syscall.SIGINT diff --git a/eventkitd/listener/signal_unix.go b/eventkitd/listener/signal_unix.go new file mode 100644 index 0000000..551755a --- /dev/null +++ b/eventkitd/listener/signal_unix.go @@ -0,0 +1,7 @@ +//go:build unix + +package listener + +import "syscall" + +var signalPrintStack = syscall.SIGUSR1