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:
parent
ed230379e7
commit
ea634090dc
@ -201,7 +201,8 @@ func ListFds(pid int) []string {
|
|||||||
}
|
}
|
||||||
f, err := os.Open(dir)
|
f, err := os.Open(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panic(err)
|
fmt.Printf("ListFds: %v\n", err)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
// Note: Readdirnames filters "." and ".."
|
// Note: Readdirnames filters "." and ".."
|
||||||
|
Loading…
Reference in New Issue
Block a user