Bump procfs to v0.0.7 (#1538)
Update Prometheus procfs library to the latest release. Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
aede04172c
commit
8a4c9c154b
25 changed files with 1595 additions and 171 deletions
12
vendor/github.com/prometheus/procfs/proc_status.go
generated
vendored
12
vendor/github.com/prometheus/procfs/proc_status.go
generated
vendored
|
|
@ -15,10 +15,10 @@ package procfs
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/prometheus/procfs/internal/util"
|
||||
)
|
||||
|
||||
// ProcStatus provides status information about the process,
|
||||
|
|
@ -75,13 +75,7 @@ type ProcStatus struct {
|
|||
|
||||
// NewStatus returns the current status information of the process.
|
||||
func (p Proc) NewStatus() (ProcStatus, error) {
|
||||
f, err := os.Open(p.path("status"))
|
||||
if err != nil {
|
||||
return ProcStatus{}, err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
data, err := ioutil.ReadAll(f)
|
||||
data, err := util.ReadFileNoStat(p.path("status"))
|
||||
if err != nil {
|
||||
return ProcStatus{}, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue