From: Michael Ellerman <mpe@ellerman.id.au>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: shuahkh@osg.samsung.com, linux-kernel@vger.kernel.org,
davej@codemonkey.org.uk, namhyung@kernel.org
Subject: Re: [PATCH] ftracetest: Don't use non-POSIX exit -1
Date: Thu, 05 Mar 2015 13:56:02 +1100 [thread overview]
Message-ID: <1425524162.32154.18.camel@ellerman.id.au> (raw)
In-Reply-To: <20150304212659.3e1d1414@grimm.local.home>
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
next prev parent reply other threads:[~2015-03-05 2:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 2:04 [PATCH] ftracetest: Don't use non-POSIX exit -1 Michael Ellerman
2015-03-05 2:26 ` Steven Rostedt
2015-03-05 2:56 ` Michael Ellerman [this message]
2015-03-05 14:04 ` Steven Rostedt
2015-03-05 2:40 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425524162.32154.18.camel@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
--cc=shuahkh@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox