From c0e92551f55b85801a6420730350b535912692b2 Mon Sep 17 00:00:00 2001 From: Naitik Shah Date: Sun, 6 Oct 2013 11:33:37 -0700 Subject: [PATCH] wtf append nil? --- grace.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grace.go b/grace.go index 9d55fbb..888978a 100644 --- a/grace.go +++ b/grace.go @@ -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