mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-22 06:43:28 +00:00
Upgrade to go-execute/v2
Upgrades to go-execute/v2 and updates various other dependencies. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
8
vendor/github.com/prometheus/procfs/thread.go
generated
vendored
8
vendor/github.com/prometheus/procfs/thread.go
generated
vendored
@ -45,7 +45,7 @@ func (fs FS) AllThreads(pid int) (Procs, error) {
|
||||
|
||||
names, err := d.Readdirnames(-1)
|
||||
if err != nil {
|
||||
return Procs{}, fmt.Errorf("could not read %q: %w", d.Name(), err)
|
||||
return Procs{}, fmt.Errorf("%s: could not read %q: %w", ErrFileRead, d.Name(), err)
|
||||
}
|
||||
|
||||
t := Procs{}
|
||||
@ -55,7 +55,7 @@ func (fs FS) AllThreads(pid int) (Procs, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
t = append(t, Proc{PID: int(tid), fs: FS{fsi.FS(taskPath), fs.real}})
|
||||
t = append(t, Proc{PID: int(tid), fs: FS{fsi.FS(taskPath), fs.isReal}})
|
||||
}
|
||||
|
||||
return t, nil
|
||||
@ -67,12 +67,12 @@ func (fs FS) Thread(pid, tid int) (Proc, error) {
|
||||
if _, err := os.Stat(taskPath); err != nil {
|
||||
return Proc{}, err
|
||||
}
|
||||
return Proc{PID: tid, fs: FS{fsi.FS(taskPath), fs.real}}, nil
|
||||
return Proc{PID: tid, fs: FS{fsi.FS(taskPath), fs.isReal}}, nil
|
||||
}
|
||||
|
||||
// Thread returns a process for a given TID of Proc.
|
||||
func (proc Proc) Thread(tid int) (Proc, error) {
|
||||
tfs := FS{fsi.FS(proc.path("task")), proc.fs.real}
|
||||
tfs := FS{fsi.FS(proc.path("task")), proc.fs.isReal}
|
||||
if _, err := os.Stat(tfs.proc.Path(strconv.Itoa(tid))); err != nil {
|
||||
return Proc{}, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user