2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-02 09:00:50 +00:00
restic/internal/restic/progress_unix_with_siginfo.go
2020-03-12 20:59:39 +01:00

23 lines
366 B
Go

// +build darwin freebsd netbsd openbsd dragonfly
package restic
import (
"os"
"os/signal"
"syscall"
"github.com/restic/restic/internal/debug"
)
func init() {
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGINFO, syscall.SIGUSR1)
go func() {
for s := range c {
debug.Log("Signal received: %v\n", s)
forceUpdateProgress <- true
}
}()
}