Skip to content

Commit

Permalink
eventkitd/listener: make it compilable on Windows
Browse files Browse the repository at this point in the history
Change-Id: I00fedd1c590d5461cbe509d999064401559c6579
  • Loading branch information
egonelbre committed Dec 20, 2023
1 parent 968576e commit 4be2b0c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eventkitd/listener/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 7 additions & 0 deletions eventkitd/listener/signal_fallback.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//go:build !unix

package listener

import "syscall"

var signalPrintStack = syscall.SIGINT
7 changes: 7 additions & 0 deletions eventkitd/listener/signal_unix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//go:build unix

package listener

import "syscall"

var signalPrintStack = syscall.SIGUSR1

0 comments on commit 4be2b0c

Please sign in to comment.