1
0
mirror of https://github.com/golang/go synced 2024-11-24 14:10:03 -07:00

os/exec: dump lsof on failure

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5504063
This commit is contained in:
Russ Cox 2011-12-21 17:17:28 -05:00
parent 89c7e206d1
commit 914ab8a23f

View File

@ -262,6 +262,7 @@ func TestHelperProcess(*testing.T) {
f, err := os.Open(os.Args[0])
if err != nil {
fmt.Printf("error opening file with expected fd %d: %v", wantfd, err)
fmt.Println(Command("lsof", "-p", fmt.Sprint(os.Getpid())).CombinedOutput())
os.Exit(1)
}
if got := f.Fd(); got != wantfd {