test_helpers: ListFds: handle an exited process gracefully

This used to dump a backtrace to the console which obscured what
is going on.
This commit is contained in:
Jakob Unterwurzacher 2019-09-08 16:15:35 +02:00
parent ed230379e7
commit ea634090dc
1 changed files with 2 additions and 1 deletions

View File

@ -201,7 +201,8 @@ func ListFds(pid int) []string {
}
f, err := os.Open(dir)
if err != nil {
log.Panic(err)
fmt.Printf("ListFds: %v\n", err)
return nil
}
defer f.Close()
// Note: Readdirnames filters "." and ".."