Browse code

Remove SysinitPath from process

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Michael Crosby authored on 2014/01/14 08:09:41
Showing 3 changed files
... ...
@@ -675,18 +675,17 @@ func (container *Container) Start() (err error) {
675 675
 	}
676 676
 
677 677
 	container.process = &execdriver.Process{
678
-		ID:          container.ID,
679
-		Privileged:  container.hostConfig.Privileged,
680
-		Rootfs:      root,
681
-		InitPath:    "/.dockerinit",
682
-		Entrypoint:  container.Path,
683
-		Arguments:   container.Args,
684
-		WorkingDir:  workingDir,
685
-		ConfigPath:  container.lxcConfigPath(),
686
-		Network:     en,
687
-		Tty:         container.Config.Tty,
688
-		User:        container.Config.User,
689
-		SysInitPath: runtime.sysInitPath,
678
+		ID:         container.ID,
679
+		Privileged: container.hostConfig.Privileged,
680
+		Rootfs:     root,
681
+		InitPath:   "/.dockerinit",
682
+		Entrypoint: container.Path,
683
+		Arguments:  container.Args,
684
+		WorkingDir: workingDir,
685
+		ConfigPath: container.lxcConfigPath(),
686
+		Network:    en,
687
+		Tty:        container.Config.Tty,
688
+		User:       container.Config.User,
690 689
 	}
691 690
 	container.process.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
692 691
 
... ...
@@ -29,18 +29,17 @@ type Network struct {
29 29
 type Process struct {
30 30
 	exec.Cmd
31 31
 
32
-	ID          string
33
-	Privileged  bool
34
-	User        string
35
-	Rootfs      string // root fs of the container
36
-	InitPath    string // dockerinit
37
-	Entrypoint  string
38
-	Arguments   []string
39
-	WorkingDir  string
40
-	ConfigPath  string
41
-	Tty         bool
42
-	Network     *Network // if network is nil then networking is disabled
43
-	SysInitPath string
32
+	ID         string
33
+	Privileged bool
34
+	User       string
35
+	Rootfs     string // root fs of the container
36
+	InitPath   string // dockerinit
37
+	Entrypoint string
38
+	Arguments  []string
39
+	WorkingDir string
40
+	ConfigPath string
41
+	Tty        bool
42
+	Network    *Network // if network is nil then networking is disabled
44 43
 }
45 44
 
46 45
 func (c *Process) Pid() int {
... ...
@@ -256,6 +256,7 @@ func linkLxcStart(root string) error {
256 256
 	return os.Symlink(sourcePath, targetPath)
257 257
 }
258 258
 
259
+// TODO: This can be moved to the mountinfo reader in the mount pkg
259 260
 func rootIsShared() bool {
260 261
 	if data, err := ioutil.ReadFile("/proc/self/mountinfo"); err == nil {
261 262
 		for _, line := range strings.Split(string(data), "\n") {