dobyte / due

A lightweight distributed game server framework developed based on Go language.
MIT License
444 stars 72 forks source link

windows系统下无"syscall.SIGUSR1, syscall.SIGUSR2"信号,无法通过编译 #5

Closed nevercatchmeow closed 1 year ago

nevercatchmeow commented 1 year ago

如题,windows系统下无"syscall.SIGUSR1, syscall.SIGUSR2"信号,无法通过编译,源代码:container.go:41

// Serve 启动容器
func (c *Container) Serve() {
       // ...
    signal.Notify(c.sig, syscall.SIGHUP, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGKILL, syscall.SIGTERM, syscall.SIGUSR1, syscall.SIGUSR2)
      // ...
}

是否可在监听信号前通过runtime.GOOS判断当前系统以适配?