From f0e0be6e9020caff0b44e0dcb44c8b2e707710f0 Mon Sep 17 00:00:00 2001 From: LE Manh Cuong Date: Tue, 26 Mar 2019 11:24:40 +0700 Subject: [PATCH] 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 --- src/os/proc.go | 2 ++ 1 file changed, 2 insertions(+) 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. -- 2.50.0