mirror of https://github.com/golang/go.git
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:
parent
3306d119b0
commit
b3f224b280
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue