mirror of https://github.com/shirou/gopsutil
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
261 B
Go
18 lines
261 B
Go
5 years ago
|
// +build openbsd
|
||
|
|
||
|
package load
|
||
|
|
||
|
import (
|
||
|
"unsafe"
|
||
|
|
||
|
"golang.org/x/sys/unix"
|
||
|
)
|
||
|
|
||
|
func getForkStat() (forkstat, error) {
|
||
|
b, err := unix.SysctlRaw("kern.forkstat")
|
||
|
if err != nil {
|
||
|
return forkstat{}, err
|
||
|
}
|
||
|
return *(*forkstat)(unsafe.Pointer((&b[0]))), nil
|
||
|
}
|