From f47e417466532212534a18d510a9d76e2e8f9f61 Mon Sep 17 00:00:00 2001 From: John Howard Date: Wed, 18 Jan 2017 12:28:52 -0800 Subject: [PATCH] Windows: Remove GetPidsForContainer Signed-off-by: John Howard --- libcontainerd/client_windows.go | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/libcontainerd/client_windows.go b/libcontainerd/client_windows.go index a70e9e2e99..f35a662c6f 100644 --- a/libcontainerd/client_windows.go +++ b/libcontainerd/client_windows.go @@ -564,23 +564,9 @@ func (clnt *client) Restore(containerID string, _ StdioCallback, unusedOnWindows } // GetPidsForContainer returns a list of process IDs running in a container. -// Although implemented, this is not used in Windows. +// Not used on Windows. func (clnt *client) GetPidsForContainer(containerID string) ([]int, error) { - var pids []int - clnt.lock(containerID) - defer clnt.unlock(containerID) - cont, err := clnt.getContainer(containerID) - if err != nil { - return nil, err - } - - // Add the first process - pids = append(pids, int(cont.containerCommon.systemPid)) - // And add all the exec'd processes - for _, p := range cont.processes { - pids = append(pids, int(p.processCommon.systemPid)) - } - return pids, nil + return nil, errors.New("not implemented on Windows") } // Summary returns a summary of the processes running in a container.