zhangmeng
2020-01-14 e7fe0112f12700d696a918f6525493a24ee7059f
remove default LD_LIBRARY_PATH env
1个文件已修改
7 ■■■■ 已修改文件
app/master/reaper.go 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/master/reaper.go
@@ -51,11 +51,16 @@
    cmd := exec.CommandContext(ctxt, bin, args...)
    rEnv := ""
    if len(env) != 0 {
        rEnv = "LD_LIBRARY_PATH=" + env
        runtime := "LD_LIBRARY_PATH"
        rEnv = runtime + "=" + env
        logo.Infoln("Env String: ", rEnv)
        // remove os environ ld
        old := os.Getenv(runtime)
        os.Unsetenv(runtime)
        cmd.Env = os.Environ()
        cmd.Env = append(cmd.Env, rEnv)
        os.Setenv(runtime, old)
    }
    pid := -1