restic/internal/progress_unix.go

23 lines
323 B
Go
Raw Normal View History

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