[uClibc] WEXITSTATUS

Gerhard Uttenthaler uttenthaler at ems-wuensche.com
Thu Nov 21 13:07:22 UTC 2002


Hello,

some time ago I asked about the following, but got never any respond. So 
    I try again...

The WEXITSTATUS() macro should return the least significant 8 bits, but
the implementation in  "libc/sysdeps/linux/common/bits/waitstatus.h"
return the higher 8bits:
#define       __WEXITSTATUS(status)   (((status) & 0xff00) >> 8)

My patch is:
#define __WEXITSTATUS(status)     (status  & 0x00ff)

Because this macro would never work correctly, I wonder, why it never 
has been mentioned. Do I have a wrong configuration for the uClibc or 
found a bug or ?

BTW: Are the other macros then correct? I've found no specification
about the "status" variable bits used there.

We use ARM7/nommu and uClibc 0.9.15.

Thanks
Gerhard Uttenthaler
uttenthaler at ems-wuensche.com




More information about the uClibc mailing list