add lock in libcontainerd client AddProcess of Windows
Signed-off-by: allencloud <allen.sun@daocloud.io> Upstream-commit: 5143be0ccf70c7cb2acc2aa39fd7ec47450e5daa Component: engine
This commit is contained in:
@@ -669,7 +669,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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user