MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / startCopyoverSignalHandler

Function startCopyoverSignalHandler

signals_unix.go:17–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17func startCopyoverSignalHandler() {
18 sigCh := make(chan os.Signal, 1)
19 signal.Notify(sigCh, syscall.SIGUSR1)
20 go func() {
21 for range sigCh {
22 mudlog.Info("SIGUSR1 received, initiating copyover")
23 if err := triggerCopyover(); err != nil {
24 mudlog.Error("copyover failed", "error", err)
25 }
26 }
27 }()
28}

Callers 1

mainFunction · 0.70

Calls 3

InfoFunction · 0.92
ErrorFunction · 0.92
triggerCopyoverFunction · 0.85

Tested by

no test coverage detected