2020-04-20 17:49:10 +00:00
|
|
|
// +build !windows
|
|
|
|
|
|
|
|
package agent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"os/signal"
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
const flushSignal = syscall.SIGUSR1
|
|
|
|
|
|
|
|
func watchForFlushSignal(flushRequested chan os.Signal) {
|
|
|
|
signal.Notify(flushRequested, flushSignal)
|
2020-04-21 17:33:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func stopListeningForFlushSignal(flushRequested chan os.Signal) {
|
2020-04-20 17:49:10 +00:00
|
|
|
defer signal.Stop(flushRequested)
|
|
|
|
}
|