wtf append nil?
This commit is contained in:
parent
f2bbd9297e
commit
c0e92551f5
3
grace.go
3
grace.go
@ -222,10 +222,9 @@ func Restart(listeners []Listener) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
allFiles := append([]*os.File{os.Stdin, os.Stdout, os.Stderr}, files...)
|
allFiles := append([]*os.File{os.Stdin, os.Stdout, os.Stderr}, files...)
|
||||||
allFiles = append(allFiles, nil)
|
|
||||||
_, err = os.StartProcess(argv0, os.Args, &os.ProcAttr{
|
_, err = os.StartProcess(argv0, os.Args, &os.ProcAttr{
|
||||||
Dir: wd,
|
Dir: wd,
|
||||||
Env: append(os.Environ(), fmt.Sprintf("%s=%d", envCountKey, len(files))),
|
Env: append(os.Environ(), fmt.Sprintf("%s=%d", envCountKey, len(listeners))),
|
||||||
Files: allFiles,
|
Files: allFiles,
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user