MCPcopy
hub / github.com/gotify/server / doShutdownOnSignal

Function doShutdownOnSignal

runner/runner.go:63–68  ·  view source on GitHub ↗
(shutdown chan<- error)

Source from the content-addressed store, hash-verified

61}
62
63func doShutdownOnSignal(shutdown chan<- error) {
64 onSignal := make(chan os.Signal, 1)
65 signal.Notify(onSignal, os.Interrupt, syscall.SIGTERM)
66 sig := <-onSignal
67 doShutdown(shutdown, fmt.Errorf("received signal %s", sig))
68}
69
70func doShutdown(shutdown chan<- error, err error) {
71 select {

Callers 1

RunFunction · 0.85

Calls 3

doShutdownFunction · 0.85
ErrorfMethod · 0.80
NotifyMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…