aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata/testprogcgo/threadprof.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/testdata/testprogcgo/threadprof.go')
-rw-r--r--src/runtime/testdata/testprogcgo/threadprof.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/testdata/testprogcgo/threadprof.go b/src/runtime/testdata/testprogcgo/threadprof.go
index d62d4b4be83..00b511d23be 100644
--- a/src/runtime/testdata/testprogcgo/threadprof.go
+++ b/src/runtime/testdata/testprogcgo/threadprof.go
@@ -92,7 +92,9 @@ func CgoExternalThreadSignal() {
return
}
- out, err := exec.Command(os.Args[0], "CgoExternalThreadSignal", "crash").CombinedOutput()
+ cmd := exec.Command(os.Args[0], "CgoExternalThreadSignal", "crash")
+ cmd.Dir = os.TempDir() // put any core file in tempdir
+ out, err := cmd.CombinedOutput()
if err == nil {
fmt.Println("C signal did not crash as expected")
fmt.Printf("\n%s\n", out)