Files
athens/internal/shutdown/signals.go
2023-01-24 18:04:56 -08:00

16 lines
341 B
Go

//go:build unix
package shutdown
import (
"os"
"syscall"
)
// GetSignals returns the appropriate signals to catch for a clean shutdown, dependent on the OS.
//
// On Unix-like operating systems, it is important to catch SIGTERM in addition to SIGINT.
func GetSignals() []os.Signal {
return []os.Signal{os.Interrupt, syscall.SIGTERM}
}