2
2
mirror of https://github.com/octoleo/restic.git synced 2024-09-27 14:09:01 +00:00
restic/internal/progress_unix.go

23 lines
296 B
Go
Raw Normal View History

2017-07-03 18:39:42 +00:00
// +build !windows,!darwin
package restic
import (
"os"
"os/signal"
"syscall"
"restic/debug"
)
func init() {
c := make(chan os.Signal)
signal.Notify(c, syscall.SIGUSR1)
go func() {
for s := range c {
2016-09-27 20:35:08 +00:00
debug.Log("Signal received: %v\n", s)
forceUpdateProgress <- true
}
}()
}