MCPcopy
hub / github.com/caddyserver/caddy / TrapSignals

Function TrapSignals

sigtrap.go:29–32  ·  view source on GitHub ↗

TrapSignals create signal/interrupt handlers as best it can for the current OS. This is a rather invasive function to call in a Go program that captures signals already, so in that case it would be better to implement these handlers yourself.

()

Source from the content-addressed store, hash-verified

27// that captures signals already, so in that case it would be better to
28// implement these handlers yourself.
29func TrapSignals() {
30 trapSignalsCrossPlatform()
31 trapSignalsPosix()
32}
33
34// trapSignalsCrossPlatform captures SIGINT or interrupt (depending
35// on the OS), which initiates a graceful shutdown. A second SIGINT

Callers

nothing calls this directly

Calls 2

trapSignalsCrossPlatformFunction · 0.85
trapSignalsPosixFunction · 0.70

Tested by

no test coverage detected