2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 12:55:18 +00:00

Merge pull request #1082 from Habbie/siginfo

support SIGINFO on Darwin
This commit is contained in:
Alexander Neumann 2017-07-09 21:41:29 +02:00
commit c4c731bd9a
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
}
}()
}