1 Star 0 Fork 0

jinyule/cow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main_windows.go 646 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
import (
"os"
"os/signal"
"syscall"
)
func sigHandler() {
// TODO On Windows, these signals will not be triggered on closing cmd
// window. How to detect this?
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
for sig := range sigChan {
// May handle other signals in the future.
info.Printf("%v caught, exit\n", sig)
storeSiteStat(siteStatExit)
// Windows has no SIGUSR1 signal, so relaunching is not supported now.
/*
if sig == syscall.SIGUSR1 {
relaunch = true
}
*/
close(quit)
break
}
/*
if *cpuprofile != "" {
pprof.StopCPUProfile()
}
*/
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/jinyule/cow.git
git@gitee.com:jinyule/cow.git
jinyule
cow
cow
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385