Hi Mark, Thank you for the reply!
Mark H Weaver <m...@netris.org> writes: >> I see. Then what's the intended use of status:exit-val? I've read its >> documentation and viewed its source a few times, and it seems like this >> procedure basically behaves like the identity function. > > I'm not sure where you got that idea, but it's definitely not the > identity function. I didn't realize that additional information was encoded in the integer status value. That explains why I was confused. >> I'm having trouble thinking of a case where one would use >> status:exit-val instead of simply using the integer status value >> directly. > > There's one case where you can use the integer status value directly: > you can check if it's zero, and if it is, that indicates that the > program exited normally with zero exit value. > > If the status value is non-zero, and you want to know more information > about what happened, then you must use the status:* procedures. This makes sense now. > [...] I wonder if it would be enough to simply change "process status > code" to "integer status value" [...]. I agree. I've attached a new patch that makes the change. It also adds a cross-reference that I think is helpful. How does it look? -- Chris
From 720a2069286e983b63b2d66b4471bc4e30a8d2cc Mon Sep 17 00:00:00 2001 From: Chris Marusich <cmmarus...@gmail.com> Date: Sun, 14 Oct 2018 00:47:23 -0700 Subject: [PATCH] Clarify the manual's "Processes" section. * doc/ref/posix.texi (Processes): Use the phrase "integer status value" consistently, and add a cross-reference to the section of the glibc manual that explains what it is. --- doc/ref/posix.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi index 5cb68a292..388efc368 100644 --- a/doc/ref/posix.texi +++ b/doc/ref/posix.texi @@ -1744,13 +1744,14 @@ The return value is a pair containing: The process ID of the child process, or 0 if @code{WNOHANG} was specified and no process was collected. @item -The integer status value. +The integer status value (@pxref{Process Completion Status,,, libc, The +GNU C Library Reference Manual}). @end enumerate @end deffn The following three -functions can be used to decode the process status code returned -by @code{waitpid}. +functions can be used to decode the integer status value returned by +@code{waitpid}. @deffn {Scheme Procedure} status:exit-val status @deffnx {C Function} scm_status_exit_val (status) -- 2.19.1
signature.asc
Description: PGP signature