Fixes #30959
Change-Id: I9d30d79e2dbb3f8c8d6555f8c64862b133638d5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/169357
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
// Exit causes the current program to exit with the given status code.
// Conventionally, code zero indicates success, non-zero an error.
// The program terminates immediately; deferred functions are not run.
+//
+// For portability, the status code should be in the range [0, 125].
func Exit(code int) {
if code == 0 {
// Give race detector a chance to fail the program.