Add checkpoint and restore to client package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-06-02 10:31:30 -07:00
parent f105db9626
commit a8c5542ba8
13 changed files with 580 additions and 87 deletions

View File

@@ -70,13 +70,13 @@ func (m *Monitor) Start(c *exec.Cmd) error {
c: c,
ExitCh: make(chan int, 1),
}
m.Lock()
defer m.Unlock()
// start the process
if err := rc.c.Start(); err != nil {
return err
}
m.Lock()
m.cmds[rc.c.Process.Pid] = rc
m.Unlock()
return nil
}