]> Cypherpunks repositories - gostls13.git/commitdiff
os: document exit status range value
authorLE Manh Cuong <cuong.manhle.vn@gmail.com>
Tue, 26 Mar 2019 04:24:40 +0000 (11:24 +0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 27 Mar 2019 04:37:34 +0000 (04:37 +0000)
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>
src/os/proc.go

index 804128a1da4bf5ae2932f26bbd36671fa12be098..7364d631f213bb0cda11cf1557eb67f70503ad8a 100644 (file)
@@ -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.