2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-06 11:00:48 +00:00
restic/src/restic/progress_unix.go

23 lines
314 B
Go

// +build !windows
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 {
debug.Log("progress.handleSIGUSR1", "Signal received: %v\n", s)
forceUpdateProgress <- true
}
}()
}