浏览代码

pkg/pidfile: replace uses of windows.Close() with windows.CloseHandle()

Since https://golang.org/cl/4600042, Close is a straight wrapper of CloseHandle.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 年之前
父节点
当前提交
a35bcd01c5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/pidfile/pidfile_windows.go

+ 1 - 1
pkg/pidfile/pidfile_windows.go

@@ -11,7 +11,7 @@ func processExists(pid int) bool {
 	}
 	var c uint32
 	err = windows.GetExitCodeProcess(h, &c)
-	windows.Close(h)
+	_ = windows.CloseHandle(h)
 	if err != nil {
 		// From the GetExitCodeProcess function (processthreadsapi.h) API docs:
 		// https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodeprocess