Ocean/Shutdown/Init.go

14 lines
251 B
Go
Raw Normal View History

package Shutdown
import "container/list"
import "os/signal"
import "os"
func InitShutdown() {
shutdownHandlers = list.New()
// Apply the shutdown handler:
signal.Notify(shutdownSignal, os.Interrupt, os.Kill)
go executeShutdown()
}