[process]: move ErrorNoChildren to platform independent.

This commit is contained in:
shirou 2018-03-24 15:56:32 +09:00
parent ebe614f6e1
commit 26a4a2f995
2 changed files with 6 additions and 6 deletions

View File

@ -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"`

View File

@ -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