container: fix collector (#2057)

This commit is contained in:
Jan-Otto Kröpke
2025-05-24 11:29:52 +02:00
committed by GitHub
parent 6dd21a8e00
commit 5e1a802237
4 changed files with 129 additions and 66 deletions

View File

@@ -31,7 +31,13 @@ const (
)
func OpenJobObject(name string) (windows.Handle, error) {
handle, _, err := procOpenJobObject.Call(JobObjectQuery, 0, uintptr(unsafe.Pointer(&name)))
ptr, _ := windows.UTF16PtrFromString(name)
handle, _, err := procOpenJobObject.Call(
JobObjectQuery,
0,
uintptr(unsafe.Pointer(ptr)),
)
if handle == 0 {
return 0, err
}