diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index 34337450a08c7d78b9efe9faae81ef1087bf73ee..bd20dd49553e9089d253837f9af6969b0b0a4b2f 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -262,9 +262,13 @@ func TestStdinCloseRace(t *testing.T) {
 		t.Fatalf("Start: %v", err)
 	}
 	go func() {
-		if err := cmd.Process.Kill(); err != nil {
-			t.Errorf("Kill: %v", err)
-		}
+		// We don't check the error return of Kill. It is
+		// possible that the process has already exited, in
+		// which case Kill will return an error "process
+		// already finished". The purpose of this test is to
+		// see whether the race detector reports an error; it
+		// doesn't matter whether this Kill succeeds or not.
+		cmd.Process.Kill()
 	}()
 	go func() {
 		// Send the wrong string, so that the child fails even