Merge pull request #474 from zhuangel:proctasks

PiperOrigin-RevId: 258479216
This commit is contained in:
gVisor bot 2019-07-16 18:12:07 -07:00
commit 78a2704bde
1 changed files with 1 additions and 0 deletions

View File

@ -188,6 +188,7 @@ func (f *subtasksFile) Readdir(ctx context.Context, file *fs.File, ser fs.Dentry
taskInts = append(taskInts, int(tid))
}
sort.Sort(sort.IntSlice(taskInts))
// Find the task to start at.
idx := sort.SearchInts(taskInts, int(offset))
if idx == len(taskInts) {