// Copyright 2019 github.com. All rights reserved. // Use of this source code is governed by github.com. package tasker import ( "os" "syscall" ) var ( interrupt = false ) func SignalNotify(signal os.Signal) { switch signal { case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT, syscall.SIGKILL: interrupt = true } } func Interrupted() bool { return interrupt }