Fix shim deadlock when joining an existing pid namespace (#290)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
3abb9fc411
commit
0ac3cd1be1
6 changed files with 21 additions and 8 deletions
|
@ -46,9 +46,10 @@ func (s *Supervisor) exit(t *ExitTask) error {
|
|||
}
|
||||
container := proc.Container()
|
||||
ne := &DeleteTask{
|
||||
ID: container.ID(),
|
||||
Status: status,
|
||||
PID: proc.ID(),
|
||||
ID: container.ID(),
|
||||
Status: status,
|
||||
PID: proc.ID(),
|
||||
Process: proc,
|
||||
}
|
||||
s.delete(ne)
|
||||
|
||||
|
@ -72,6 +73,7 @@ func (s *Supervisor) execExit(t *ExecExitTask) error {
|
|||
if err := container.RemoveProcess(t.PID); err != nil {
|
||||
logrus.WithField("error", err).Error("containerd: find container for pid")
|
||||
}
|
||||
t.Process.Wait()
|
||||
s.notifySubscribers(Event{
|
||||
Timestamp: time.Now(),
|
||||
ID: t.ID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue