wtf append nil?

This commit is contained in:
Naitik Shah 2013-10-06 11:33:37 -07:00
parent f2bbd9297e
commit c0e92551f5

View File

@ -222,10 +222,9 @@ func Restart(listeners []Listener) (err error) {
return err
}
allFiles := append([]*os.File{os.Stdin, os.Stdout, os.Stderr}, files...)
allFiles = append(allFiles, nil)
_, err = os.StartProcess(argv0, os.Args, &os.ProcAttr{
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,
})
return err