mirror of
https://github.com/apernet/OpenGFW.git
synced 2025-04-17 18:39:13 +08:00
fix: cannot trap sigkill -9
Signed-off-by: rfyiamcool <rfyiamcool@163.com>
This commit is contained in:
parent
4257788f33
commit
d35bd7adc2
@ -279,7 +279,7 @@ func runMain(cmd *cobra.Command, args []string) {
|
||||
go func() {
|
||||
// Graceful shutdown
|
||||
shutdownChan := make(chan os.Signal)
|
||||
signal.Notify(shutdownChan, os.Interrupt, os.Kill)
|
||||
signal.Notify(shutdownChan, os.Interrupt, os.Kill, syscall.SIGTERM)
|
||||
<-shutdownChan
|
||||
logger.Info("shutting down gracefully...")
|
||||
cancelFunc()
|
||||
|
Loading…
x
Reference in New Issue
Block a user