[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclibc
Subject:    Re: [PATCH] bits/waitstatus.h: correctly interpret status 0x007f
From:       Bernhard Reutner-Fischer <rep.dot.nop () gmail ! com>
Date:       2013-07-04 9:43:20
Message-ID: CAC1BbcQ+EQkTbB9k4bA2bCsm6DbhrfEd5gVEZ-5+rm6AEJ8wWw () mail ! gmail ! com
[Download RAW message or body]

On 29 June 2013 23:55, Denys Vlasenko <vda.linux@googlemail.com> wrote:
> On Sat, Jun 29, 2013 at 10:12 PM, James Hogan <james.hogan@imgtec.com> wrote:
>>> +/* Nonzero if STATUS indicates the child is stopped.
>>> + * Low byte should be 0x7f and 2nd byte should be nonzero.
>>> + * The condition is true if both bytes have at least one set bit in the same
>>> + * position in bits 0-6, but at least one of 7th bits are clear
>>> + * (because we must not match 0xffff == WCONTINUED).
>>> + */
>>> +#define        __WIFSTOPPED(status)    ((signed char)(((status) >> 8) & (status)) > 0)
>>
>> Sneaky. Of course it would match certain status codes which aren't
>> strictly WIFSTOPPED (e.g. 0x0202, WIFSIGNALED && WTERMSIG==2).
>
> There are many possible invalid combinations.
> They are not supposed to be generated by the kernel, ever.

yea, i guess it's ok to apply, please install.

thanks,
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic