Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
virtiofs: wait for virtiofsd process to release its resources
Browse files Browse the repository at this point in the history
We start virtiofsd in foreground (-f option), so we should wait for it
to reclaim its resources to avoid zombie process when qemu or virtiofsd
got killed unexpectedly.

Fixes: #1934
Signed-off-by: Eryu Guan <[email protected]>
  • Loading branch information
eryugey committed Aug 6, 2019
1 parent 00e0aaa commit a9168a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virtcontainers/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ func (q *qemu) setupVirtiofsd(timeout int) (remain int, err error) {
}
}
q.Logger().Info("virtiofsd quits")
// Wait to release resources of virtiofsd process
cmd.Process.Wait()
q.stopSandbox()
}()

Expand Down

0 comments on commit a9168a3

Please sign in to comment.