Add ctr exec

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-04-05 13:33:45 -07:00
parent 7715ddcefa
commit 47225c130c
7 changed files with 159 additions and 19 deletions

View file

@ -97,6 +97,12 @@ func (m *Monitor) Register(pid int, c *Cmd) {
m.Unlock()
}
// RegisterNL does not grab the lock internally
// the caller is responsible for locking the monitor
func (m *Monitor) RegisterNL(pid int, c *Cmd) {
m.cmds[pid] = c
}
func (m *Monitor) WaitPid(pid int) (int, error) {
m.Lock()
rc, ok := m.cmds[pid]