From 5143be0ccf70c7cb2acc2aa39fd7ec47450e5daa Mon Sep 17 00:00:00 2001 From: allencloud Date: Tue, 4 Oct 2016 10:29:21 +0800 Subject: [PATCH] add lock in libcontainerd client AddProcess of Windows Signed-off-by: allencloud --- daemon/daemon.go | 2 +- libcontainerd/client_windows.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 9911f3d2a3..8e90378b40 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -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 } diff --git a/libcontainerd/client_windows.go b/libcontainerd/client_windows.go index 86dd9c60de..1e833ce862 100644 --- a/libcontainerd/client_windows.go +++ b/libcontainerd/client_windows.go @@ -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 }