Browse Source

去掉注释

master
xyiege 6 months ago
parent
commit
9bb6c1bfb6
  1. 5
      scagent/main.go

5
scagent/main.go

@ -6,6 +6,7 @@ import (
"net/rpc" "net/rpc"
"net/rpc/jsonrpc" "net/rpc/jsonrpc"
"os" "os"
"os/signal"
"scagent/config" "scagent/config"
"scagent/core" "scagent/core"
"scagent/util" "scagent/util"
@ -90,7 +91,7 @@ func main() {
} }
} }
// os.Exit(0) os.Exit(0)
// 优雅退出 // 优雅退出
// quit := make(chan os.Signal) // quit := make(chan os.Signal)
// signal.Notify(quit, os.Interrupt, os.Kill) // signal.Notify(quit, os.Interrupt, os.Kill)
@ -102,7 +103,7 @@ func main() {
// SIGINT: Ctrl+C // SIGINT: Ctrl+C
// SIGTERM: program exit // SIGTERM: program exit
// SIGQUIT: Ctrl+/ // SIGQUIT: Ctrl+/
// signal.Notify(c, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT) signal.Notify(c, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
// 阻塞,直到接受到退出信号,才停止进程 // 阻塞,直到接受到退出信号,才停止进程
waitElegantExit(c) waitElegantExit(c)

Loading…
Cancel
Save