From 15442178c801476f873b0678a99b27f06c8e38d6 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 28 Feb 2017 15:01:38 -0800 Subject: os: don't use waitid on Darwin According to issue #19314 waitid on Darwin returns if the process is stopped, even though we specify WEXITED. Fixes #19314. Change-Id: I95faf196c11e43b7741efff79351bab45c811bc2 Reviewed-on: https://go-review.googlesource.com/37610 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/os/exec/exec_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/os/exec/exec_test.go') diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go index 7b69db7c76..95af597f15 100644 --- a/src/os/exec/exec_test.go +++ b/src/os/exec/exec_test.go @@ -868,6 +868,9 @@ func TestHelperProcess(*testing.T) { case "stderrfail": fmt.Fprintf(os.Stderr, "some stderr text\n") os.Exit(1) + case "sleep": + time.Sleep(3 * time.Second) + os.Exit(0) default: fmt.Fprintf(os.Stderr, "Unknown command %q\n", cmd) os.Exit(2) -- cgit v1.3-5-g9baa