func handleSigUsr1(handler func()) {
	ch := make(chan os.Signal, 1)
	signal.Notify(ch, syscall.SIGUSR1)
	go func() {
		for sig := range ch {
			log.L().Debug("received signal", zap.Stringer("signal", sig))
			handler()
		}
	}()
}
handleSigUsr1 listens for the SIGUSR1 signal and executes `handler()` every time it is received.
package lightning
import (
	"os"
	"os/signal"
	"syscall"
	"go.uber.org/zap"
	"github.com/pingcap/tidb-lightning/lightning/log"
)