vendor: github.com/moby/buildkit db304eb93126 (v0.13.0-dev)

full diff: d6e142600e...db304eb931

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-02-21 11:54:00 +01:00
parent 414f215929
commit 953cbf6696
127 changed files with 3442 additions and 1797 deletions

View File

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