1
0
mirror of https://github.com/golang/go synced 2024-11-20 08:54:40 -07:00

syscall: fix plan9 build broken by CL 6458050

R=golang-dev, rsc
CC=golang-dev, r, yarikos
https://golang.org/cl/6454104
This commit is contained in:
Alexey Borzenkov 2012-08-06 16:24:08 -04:00 committed by Russ Cox
parent 1df9ee0322
commit 8b5d4c3c03

View File

@ -419,11 +419,9 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error)
if err != nil {
return 0, err
}
envvalue, err := BytePtrFromString(v[i+1:])
if err != nil {
return 0, err
}
envvParsed = append(envvParsed, envItem{envname, envvalue, len(v) - i})
envvalue := make([]byte, len(v)-i)
copy(envvalue, v[i+1:])
envvParsed = append(envvParsed, envItem{envname, &envvalue[0], len(v) - i})
}
}