From: LE Manh Cuong Date: Tue, 26 Mar 2019 04:24:40 +0000 (+0700) Subject: os: document exit status range value X-Git-Tag: go1.13beta1~891 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f0e0be6e9020caff0b44e0dcb44c8b2e707710f0;p=gostls13.git os: document exit status range value Fixes #30959 Change-Id: I9d30d79e2dbb3f8c8d6555f8c64862b133638d5d Reviewed-on: https://go-review.googlesource.com/c/go/+/169357 Reviewed-by: Brad Fitzpatrick Reviewed-by: Rob Pike --- diff --git a/src/os/proc.go b/src/os/proc.go index 804128a1da..7364d631f2 100644 --- a/src/os/proc.go +++ b/src/os/proc.go @@ -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.