Add ctr exec
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
7715ddcefa
commit
47225c130c
7 changed files with 159 additions and 19 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue