os, syscall: add ProcAttr type. Change StartProcess etc. to use it.

The Windows code is untested.

R=rsc, gri, brainman, rsc1
CC=golang-dev
https://golang.org/cl/4253052
This commit is contained in:
Roger Peppe 2011-03-15 14:41:19 -04:00 committed by Russ Cox
parent a34f1bbb22
commit aa55c05213
9 changed files with 115 additions and 54 deletions

View file

@ -105,7 +105,7 @@ func Run(name string, argv, envv []string, dir string, stdin, stdout, stderr int
}
// Run command.
c.Process, err = os.StartProcess(name, argv, envv, dir, fd[0:])
c.Process, err = os.StartProcess(name, argv, &os.ProcAttr{Dir: dir, Files: fd[:], Env: envv})
if err != nil {
goto Error
}