lkml.org 
[lkml]   [2013]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Define WTERMSIG{,_MASK} and WCOREDUMP and use where appropriate
On 07/01, Denys Vlasenko wrote:
>
> Grepping for numeric constants is inconvenient.

Personally I agree very much, and I like the intent.

> +#define WTERMSIG_MASK 0x7f
> +#define WTERMSIG(status) ((status) & WTERMSIG_MASK)
> +#define WCOREDUMP(status) ((status) & 0x80)

But I am not sure we need WTERMSIG/WCOREDUMP helpers, although
I won't really argue.

OTOH, I think it would be nice to add the name for 0x80 and
change coredump_finish().

And if we do not add WTERMSIG(), then perhaps we can turn other
0x7f's into WTERMSIG_MASK?

Oleg.



\
 
 \ /
  Last update: 2013-07-02 22:21    [W:0.460 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site