Merge pull request #27136 from allencloud/add-lock-in-libcontainerd

add lock in libcontainerd client AddProcess of Windows
This commit is contained in:
Brian Goff 2016-10-04 09:29:59 -04:00 committed by GitHub
commit 5e072a25f8
2 changed files with 2 additions and 1 deletions

View File

@ -670,7 +670,7 @@ func NewDaemon(config *Config, registryService registry.Service, containerdRemot
return nil, err
}
// Plugin system initialization should happen before restore. Dont change order.
// Plugin system initialization should happen before restore. Do not change order.
if err := pluginInit(d, config, containerdRemote); err != nil {
return nil, err
}

View File

@ -328,6 +328,7 @@ func (clnt *client) AddProcess(ctx context.Context, containerID, processFriendly
// Tell the engine to attach streams back to the client
if err := clnt.backend.AttachStreams(processFriendlyName, *iopipe); err != nil {
clnt.lock(containerID)
return err
}