mirror of
https://github.com/octoleo/restic.git
synced 2024-11-09 23:00:57 +00:00
23 lines
323 B
Go
23 lines
323 B
Go
// +build !windows,!darwin
|
|
|
|
package restic
|
|
|
|
import (
|
|
"os"
|
|
"os/signal"
|
|
"syscall"
|
|
|
|
"github.com/restic/restic/internal/debug"
|
|
)
|
|
|
|
func init() {
|
|
c := make(chan os.Signal)
|
|
signal.Notify(c, syscall.SIGUSR1)
|
|
go func() {
|
|
for s := range c {
|
|
debug.Log("Signal received: %v\n", s)
|
|
forceUpdateProgress <- true
|
|
}
|
|
}()
|
|
}
|