func sigHandle(c <-chan os.Signal) {
	for sig := range c {
		if sig == syscall.SIGTERM || sig == syscall.SIGQUIT || sig == syscall.SIGHUP {
			log.Printf("*** caught signal %v, stop\n", sig)
			log.Printf("bbpd is in a closed state and is no longer accepting connections")
			stop_err := bbpd_route.StopBBPD()
			if stop_err != nil {
				log.Printf("graceful shutdown not possible:%s", stop_err.Error())
			}
			log.Printf("bbpd exit\n")
			os.Exit(0)
		} else if sig == syscall.SIGINT {
			log.Printf("*** caught signal %v, PANIC stop\n", sig)
			panic("bbpd panic")
			os.Exit(1)
		} else {
			log.Printf("**** caught unchecked signal %v\n", sig)
		}
	}
}
// handle signals. we prefer 1,3,15 and will panic on 2
handle signals. we prefer 1,3,15 and will panic on 2
// handle signals . we prefer 1 3 15 and will panic on 2
func sigHandle(c <-chan os.Signal) {
	for sig := range c {
		if sig == syscall.SIGTERM || sig == syscall.SIGQUIT || sig == syscall.SIGHUP {
			log.Printf("*** caught signal %v, stop\n", sig)
			log.Printf("bbpd is in a closed state and is no longer accepting connections")
			stop_err := bbpd_route.StopBBPD()
			if stop_err != nil {
				log.Printf("graceful shutdown not possible:%s", stop_err.Error())
			}
			log.Printf("bbpd exit\n")
			os.Exit(0)
		} else if sig == syscall.SIGINT {
			log.Printf("*** caught signal %v, PANIC stop\n", sig)
			panic("bbpd panic")
			os.Exit(1)
		} else {
			log.Printf("**** caught unchecked signal %v\n", sig)
		}
	}
}
func sigHandle ( c <- chan os . Signal ) { for sig := range c { if sig == syscall . SIGTERM || sig == syscall . SIGQUIT || sig == syscall . SIGHUP { log . Printf ( " \n " , sig ) log . Printf ( " " ) stop_err := bbpd_route . StopBBPD ( ) if stop_err != nil { log . Printf ( " " , stop_err . Error ( ) ) } log . Printf ( " \n " ) os . Exit ( 0 ) } else if sig == syscall . SIGINT { log . Printf ( " \n " , sig ) panic ( " " ) os . Exit ( 1 ) } else { log . Printf ( " \n " , sig ) } } }
handle signals.
handle signals .