Merge pull request #2293 from tedyu/restore-svr-close

Restore close of criuServer
This commit is contained in:
Michael Crosby 2020-04-06 15:17:46 -04:00 committed by GitHub
commit 6cda0eac45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1498,6 +1498,8 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *
if err := cmd.Start(); err != nil {
return err
}
// we close criuServer so that even if CRIU crashes or unexpectedly exits, runc will not hang.
criuServer.Close()
// cmd.Process will be replaced by a restored init.
criuProcess := cmd.Process