Browse Source

Merge pull request #30256 from Microsoft/jjh/getpidsforcontainer

Windows: Remove GetPidsForContainer old implementation
Alexander Morozov 8 years ago
parent
commit
81cf5a1834
1 changed files with 2 additions and 16 deletions
  1. 2 16
      libcontainerd/client_windows.go

+ 2 - 16
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.