1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

change to sigterm

This commit is contained in:
Darien Raymond 2018-07-27 12:31:22 +02:00
parent 06f75f7fea
commit 35762b7b28
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -4,11 +4,11 @@ import (
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"runtime"
"sync"
"syscall"
"time"
"github.com/golang/protobuf/proto"
@ -113,7 +113,7 @@ func CloseAllServers(servers []*exec.Cmd) {
Content: "Closing all servers.",
})
for _, server := range servers {
server.Process.Signal(os.Interrupt)
server.Process.Signal(syscall.SIGTERM)
}
for _, server := range servers {
server.Process.Wait()