overdue
This commit is contained in:
23
.rclone_repo/cmd/siginfo_darwin.go
Executable file
23
.rclone_repo/cmd/siginfo_darwin.go
Executable file
@@ -0,0 +1,23 @@
|
||||
//+build darwin
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/ncw/rclone/fs/accounting"
|
||||
)
|
||||
|
||||
// SigInfoHandler creates SigInfo handler
|
||||
func SigInfoHandler() {
|
||||
signals := make(chan os.Signal, 1)
|
||||
signal.Notify(signals, syscall.SIGINFO)
|
||||
go func() {
|
||||
for range signals {
|
||||
log.Printf("%v\n", accounting.Stats)
|
||||
}
|
||||
}()
|
||||
}
|
||||
Reference in New Issue
Block a user