2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-02 19:49:44 +00:00
restic/internal/progress_unix_with_siginfo.go

24 lines
348 B
Go
Raw Normal View History

2017-07-03 18:39:42 +00:00
// +build darwin
package restic
import (
"os"
"os/signal"
"syscall"
2017-07-23 12:21:03 +00:00
"github.com/restic/restic/internal/debug"
2017-07-03 18:39:42 +00:00
)
func init() {
c := make(chan os.Signal)
signal.Notify(c, syscall.SIGUSR1)
signal.Notify(c, syscall.SIGINFO)
go func() {
for s := range c {
debug.Log("Signal received: %v\n", s)
forceUpdateProgress <- true
}
}()
}