[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sysval and doc fixes [was: GNU M4 1.4.4b released (beta release)]
From: |
Eric Blake |
Subject: |
Re: sysval and doc fixes [was: GNU M4 1.4.4b released (beta release)] |
Date: |
Tue, 20 Jun 2006 03:48:36 +0000 |
> > On second thought, even if it doesn't help OS/2, it will help BeOS,
> > so I'm checking it in, along with an additional patch to beef up
> > the testsuite so that we validate an actual non-zero exit value (the
> > exit value of false is non-portable). But hopefully OS/2 does
> > define WEXITSTATUS.
>
> WEXITSTATUS is defined in sys/wait.h as
> #define WEXITSTATUS(st) ((st) >> 8)
> but I think it's not intended to be used with system().
What is it for, if not system(), waitpid(), and pclose()? Those three
functions each return a process's exit status, and POSIX has
standardized that WEXITSTATUS should grab whatever bits out
of the exit status make sense as the 8 bits that matter. Is there
a different macro in OS/2 that does the right thing, and if so,
we should probably turn it into a gnulib module.
http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/wait.h.html
--
Eric Blake
- Re: sysval and doc fixes [was: GNU M4 1.4.4b released (beta release)],
Eric Blake <=