MCPcopy Create free account
hub / github.com/foxcpp/maddy / handleSignals

Function handleSignals

signal_nonposix.go:32–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30)
31
32func handleSignals() os.Signal {
33 sig := make(chan os.Signal, 5)
34 signal.Notify(sig, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGINT)
35
36 s := <-sig
37 go func() {
38 s := handleSignals()
39 log.Printf("forced shutdown due to signal (%v)!", s)
40 os.Exit(1)
41 }()
42
43 log.Printf("signal received (%v)", s)
44 return s
45}

Callers

nothing calls this directly

Calls 1

PrintfFunction · 0.92

Tested by

no test coverage detected