Merge pull request #292 from keloyang/rpid

no need to use p.cmd.Process.Pid in function, use p.pid() instead.
This commit is contained in:
Mrunal Patel
2015-09-24 15:59:39 -07:00
+3 -3
View File
@@ -58,7 +58,7 @@ func (p *setnsProcess) signal(sig os.Signal) error {
if !ok {
return errors.New("os: unsupported signal type")
}
return syscall.Kill(p.cmd.Process.Pid, s)
return syscall.Kill(p.pid(), s)
}
func (p *setnsProcess) start() (err error) {
@@ -67,7 +67,7 @@ func (p *setnsProcess) start() (err error) {
return newSystemError(err)
}
if len(p.cgroupPaths) > 0 {
if err := cgroups.EnterPid(p.cgroupPaths, p.cmd.Process.Pid); err != nil {
if err := cgroups.EnterPid(p.cgroupPaths, p.pid()); err != nil {
return newSystemError(err)
}
}
@@ -290,7 +290,7 @@ func (p *initProcess) signal(sig os.Signal) error {
if !ok {
return errors.New("os: unsupported signal type")
}
return syscall.Kill(p.cmd.Process.Pid, s)
return syscall.Kill(p.pid(), s)
}
func (p *initProcess) setExternalDescriptors(newFds []string) {