proc: bugfix: cleaning up spurious process exited errors (#599)

Fixes flakiness of TestCmdLineArgs.
This commit is contained in:
Alessandro Arzilli
2016-07-21 00:36:31 +02:00
committed by Derek Parker
parent c7f11149d7
commit 16f16cf86d
3 changed files with 6 additions and 7 deletions

View File

@ -292,6 +292,10 @@ func (dbp *Process) trapWait(pid int) (*Thread, error) {
var cloned uint
dbp.execPtraceFunc(func() { cloned, err = sys.PtraceGetEventMsg(wpid) })
if err != nil {
if err == sys.ESRCH {
// thread died while we were adding it
continue
}
return nil, fmt.Errorf("could not get event message: %s", err)
}
th, err = dbp.addThread(int(cloned), false)