From 2a1e8d7c30c90e17fccaeec89e4963a8d825063d Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 25 Jul 2024 20:28:45 +0300 Subject: [PATCH] exit(3): clarify how to obtain full exit status of the exited process (cherry picked from commit c4269e63ecf301306a6176b9fe9002c4c2265695) --- lib/libc/stdlib/exit.3 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/libc/stdlib/exit.3 b/lib/libc/stdlib/exit.3 index c190f5fac27..2fb3ab165da 100644 --- a/lib/libc/stdlib/exit.3 +++ b/lib/libc/stdlib/exit.3 @@ -103,6 +103,20 @@ values described in .Xr sysexits 3 may be used to provide more information to the parent process. .Pp +The complete +.Fa status +value is avaliable as +.Va si_status +member of the +.Vt siginfo_t +structure, to the +.Xr wait6 2 +and +.Xr sigwaitinfo 2 +callers, and +.Va SIGCHLD +signal handlers. +.Pp Calls to the .Fn exit function are serialized.