lkml.org 
[lkml]   [2015]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ftracetest: Don't use non-POSIX exit -1
From
Date
On Wed, 2015-03-04 at 21:26 -0500, Steven Rostedt wrote:
> On Thu, 5 Mar 2015 13:04:02 +1100
> Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> > POSIX says that exit takes an unsigned integer between 0 and 255.
> >
> > Convert exit -1 to exit 255.
> >
>
> Why 255? Why not just exit 1?

I was trying to emulate the current behaviour:

$ /bin/bash
$ exit -1
exit
$ echo $?
255

> Actually, don't we have explicit numbers for exit status?
>
> /me not looking at the code right now to figure that out.

Yeah looks like it, and some interesting signal handling tricks:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/ftrace/ftracetest#n123

I'll send a new version using "exit $FAIL" ?

cheers




\
 
 \ /
  Last update: 2015-03-05 04:21    [W:0.120 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site