mirror of
https://github.com/restic/restic.git
synced 2025-03-16 01:30:51 +00:00
24 lines
321 B
Go
24 lines
321 B
Go
![]() |
// +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
|
||
|
}
|
||
|
}()
|
||
|
}
|