github.com/fawick/restic@v0.1.1-0.20171126184616-c02923fbfc79/internal/restic/progress_unix_with_siginfo.go (about) 1 // +build darwin freebsd netbsd openbsd dragonfly 2 3 package restic 4 5 import ( 6 "os" 7 "os/signal" 8 "syscall" 9 10 "github.com/restic/restic/internal/debug" 11 ) 12 13 func init() { 14 c := make(chan os.Signal) 15 signal.Notify(c, syscall.SIGUSR1) 16 signal.Notify(c, syscall.SIGINFO) 17 go func() { 18 for s := range c { 19 debug.Log("Signal received: %v\n", s) 20 forceUpdateProgress <- true 21 } 22 }() 23 }