Commit f0e0be6e authored by LE Manh Cuong's avatar LE Manh Cuong Committed by Ian Lance Taylor

os: document exit status range value

Fixes #30959

Change-Id: I9d30d79e2dbb3f8c8d6555f8c64862b133638d5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/169357Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarRob Pike <r@golang.org>
parent 08ba9c02
......@@ -56,6 +56,8 @@ func Getgroups() ([]int, error) {
// 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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment