[process]: move ErrorNoChildren to platform independent.

pull/503/head
shirou 7 years ago
parent ebe614f6e1
commit 26a4a2f995

@ -3,6 +3,7 @@ package process
import (
"context"
"encoding/json"
"errors"
"runtime"
"time"
@ -11,7 +12,10 @@ import (
"github.com/shirou/gopsutil/mem"
)
var invoke common.Invoker = common.Invoke{}
var (
invoke common.Invoker = common.Invoke{}
ErrorNoChildren = errors.New("process does not have children")
)
type Process struct {
Pid int32 `json:"pid"`

@ -7,7 +7,6 @@ import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"math"
@ -23,10 +22,7 @@ import (
"golang.org/x/sys/unix"
)
var (
ErrorNoChildren = errors.New("process does not have children")
PageSize = uint64(os.Getpagesize())
)
var PageSize = uint64(os.Getpagesize())
const (
PrioProcess = 0 // linux/resource.h

Loading…
Cancel
Save