Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
20
plugins/inputs/execd/shim/goshim_windows.go
Normal file
20
plugins/inputs/execd/shim/goshim_windows.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
//go:build windows
|
||||
|
||||
package shim
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func listenForCollectMetricsSignals(ctx context.Context, collectMetricsPrompt chan os.Signal) {
|
||||
signal.Notify(collectMetricsPrompt, syscall.SIGHUP)
|
||||
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
// context done. stop to signals to avoid pushing messages to a closed channel
|
||||
signal.Stop(collectMetricsPrompt)
|
||||
}()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue