> > 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


_______________________________________________
Bug-m4 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-m4

Reply via email to