mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-03 00:56:35 +00:00
container: fix collector (#2057)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user