2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-12 22:02:23 +00:00

support SIGINFO on Darwin

This commit is contained in:
Peter van Dijk 2017-07-03 20:39:42 +02:00
parent e7577d7bb4
commit 73cc11f000
2 changed files with 24 additions and 1 deletions

View File

@ -1,4 +1,4 @@
// +build !windows
// +build !windows,!darwin
package restic

View File

@ -0,0 +1,23 @@
// +build darwin
package restic
import (
"os"
"os/signal"
"syscall"
"restic/debug"
)
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
}
}()
}