mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
24 lines
348 B
Go
24 lines
348 B
Go
|
//+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)
|
||
|
}
|
||
|
}()
|
||
|
}
|