Move environment configuration to Process

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2015-02-06 19:16:11 -08:00
parent 58023ad32f
commit 21bb5ccc4f
11 changed files with 64 additions and 38 deletions

View File

@@ -15,6 +15,7 @@ import (
type linuxUsernsInit struct {
args []string
env []string
config *configs.Config
}
@@ -76,5 +77,5 @@ func (l *linuxUsernsInit) Init() error {
if syscall.Getppid() == 1 {
return syscall.Kill(syscall.Getpid(), syscall.SIGKILL)
}
return system.Execv(l.args[0], l.args[0:], l.config.Env)
return system.Execv(l.args[0], l.args[0:], l.env)
}