]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix Setenv for plan 9
authorNicolas Owens <mischief@offblast.org>
Thu, 2 Oct 2014 08:25:56 +0000 (10:25 +0200)
committerDavid du Colombier <0intro@gmail.com>
Thu, 2 Oct 2014 08:25:56 +0000 (10:25 +0200)
envi needs to be updated during Setenv so the key can be correctly deleted later with Unsetenv.

Update #8849.

LGTM=0intro
R=bradfitz, 0intro
CC=golang-codereviews
https://golang.org/cl/149300046

src/syscall/env_plan9.go

index 3044b410a9e2ced501c14afb07a64c749d09bb92..934507905297445a039df14fb99b299d2be85e6d 100644 (file)
@@ -128,6 +128,7 @@ func Setenv(key, value string) error {
        }
        env[key] = value
        envs = append(envs, key+"="+value)
+       envi[key] = len(envs) - 1
        return nil
 }