1
0
mirror of https://github.com/golang/go synced 2024-11-18 20:04:52 -07:00

runtime: handle empty environment variables on Plan 9

LGTM=bradfitz, rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/137920044
This commit is contained in:
David du Colombier 2014-09-03 00:56:31 +02:00
parent 3306d119b0
commit b3f224b280

View File

@ -31,6 +31,10 @@ func gogetenv(key string) string {
return ""
}
n := seek(fd, 0, 2) - 1
if n <= 0 {
close(fd)
return ""
}
p := make([]byte, n)