resolve #5604: using double instead of single hyphen when forking a child process.
This commit is contained in:
parent
35483381a0
commit
d703f533d0
@ -338,15 +338,15 @@ func (srv *Server) fork() (err error) {
|
||||
var args []string
|
||||
if len(os.Args) > 1 {
|
||||
for _, arg := range os.Args[1:] {
|
||||
if arg == "-graceful" {
|
||||
if strings.TrimLeft(arg, "-") == "graceful" {
|
||||
break
|
||||
}
|
||||
args = append(args, arg)
|
||||
}
|
||||
}
|
||||
args = append(args, "-graceful")
|
||||
args = append(args, "--graceful")
|
||||
if len(runningServers) > 1 {
|
||||
args = append(args, fmt.Sprintf(`-socketorder=%s`, strings.Join(orderArgs, ",")))
|
||||
args = append(args, fmt.Sprintf(`--socketorder=%s`, strings.Join(orderArgs, ",")))
|
||||
log.Println(args)
|
||||
}
|
||||
cmd := exec.Command(path, args...)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user