summaryrefslogtreecommitdiff
path: root/pkg/machine/wsl/util_windows.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-02 12:49:58 +0200
committerGitHub <noreply@github.com>2022-09-02 12:49:58 +0200
commit4cbc4774f149fa554f3cee3c47eb8794fce8d850 (patch)
treecaa50756d6786b29901013f745130daeaf4cfad5 /pkg/machine/wsl/util_windows.go
parent9ab6449e36792734853eb59161ccd3bfe5d0d509 (diff)
parentc1480b39a9e993aaa74caabf6d5c8bb865b78784 (diff)
downloadpodman-4cbc4774f149fa554f3cee3c47eb8794fce8d850.tar.gz
podman-4cbc4774f149fa554f3cee3c47eb8794fce8d850.tar.bz2
podman-4cbc4774f149fa554f3cee3c47eb8794fce8d850.zip
Merge pull request #15404 from arixmkii/win_compat2
Improved Windows compatibility for machine command
Diffstat (limited to 'pkg/machine/wsl/util_windows.go')
-rw-r--r--pkg/machine/wsl/util_windows.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/pkg/machine/wsl/util_windows.go b/pkg/machine/wsl/util_windows.go
index 43f54fdd4..6c74e5652 100644
--- a/pkg/machine/wsl/util_windows.go
+++ b/pkg/machine/wsl/util_windows.go
@@ -280,18 +280,6 @@ func obtainShutdownPrivilege() error {
return nil
}
-func getProcessState(pid int) (active bool, exitCode int) {
- const da = syscall.STANDARD_RIGHTS_READ | syscall.PROCESS_QUERY_INFORMATION | syscall.SYNCHRONIZE
- handle, err := syscall.OpenProcess(da, false, uint32(pid))
- if err != nil {
- return false, int(syscall.ERROR_PROC_NOT_FOUND)
- }
-
- var code uint32
- syscall.GetExitCodeProcess(handle, &code)
- return code == 259, int(code)
-}
-
func addRunOnceRegistryEntry(command string) error {
k, _, err := registry.CreateKey(registry.CURRENT_USER, `Software\Microsoft\Windows\CurrentVersion\RunOnce`, registry.WRITE)
if err != nil {