time(1): Return value and sys/wait.h macros
I've been asked (#203804) to supply an entry in the Debian manual page of my
GNU time package (which, btw, is orphaned upstream, any takers ?).
The main() function ends on
if (WIFSTOPPED (res.waitstatus))
exit (WSTOPSIG (res.waitstatus));
else if (WIFSIGNALED (res.waitstatus))
exit (WTERMSIG (res.waitstatus));
else if (WIFEXITED (res.waitstatus))
exit (WEXITSTATUS (res.waitstatus));
and those macros are defined in wait.h. Now, not being a systems programmer,
I am a little foggy on the details. So far, I have
returns one of three possible return values depending on whether the program
was stopped, interrupted, or exited normally. The return value is derived
used the macros defined in
.IR wait.h .
Is that correct and good enough? If not, any suggestion would be greatly
Those are my principles, and if you don't like them... well, I have others.
-- Groucho Marx