From: Denys Vlasenko <vda.linux@googlemail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH v2] If init dies, log a signal which killed it, if any.
Date: Wed, 25 Jan 2012 10:08:42 +0100 [thread overview]
Message-ID: <201201251008.42120.vda.linux@googlemail.com> (raw)
In-Reply-To: <20120124162016.08a37b2f.akpm@linux-foundation.org>
On Wednesday 25 January 2012 01:20, Andrew Morton wrote:
> It's a bit user-hostile to print a hex number in such a context without
> the leading 0x. The %08 does provide a hint - users are unlikely to
> interpret 00000011 as 11. But still, I think...
>
> --- a/kernel/exit.c~kernel-exitc-if-init-dies-log-a-signal-which-killed-it-if-any-fix
> +++ a/kernel/exit.c
> @@ -711,7 +711,7 @@ static struct task_struct *find_new_reap
> if (unlikely(pid_ns->child_reaper == father)) {
> write_unlock_irq(&tasklist_lock);
> if (unlikely(pid_ns == &init_pid_ns)) {
> - panic("Attempted to kill init! exitcode=%08x\n",
> + panic("Attempted to kill init! exitcode=0x%08x\n",
> father->signal->group_exit_code ?:
> father->exit_code);
> }
> _
Looks good to me.
> Or maybe we should use %d. Does anyone use hex for exit codes?
I guess hex is better, considering that normal (non-signal) exit code
is stored in bits 8-15. It's more readable to see exit code 3 as 0x300
then as 768.
--
vda
prev parent reply other threads:[~2012-01-25 9:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 22:17 [PATCH v2] If init dies, log a signal which killed it, if any Denys Vlasenko
2012-01-23 15:03 ` Oleg Nesterov
2012-01-25 0:20 ` Andrew Morton
2012-01-25 9:08 ` Denys Vlasenko [this message]
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=201201251008.42120.vda.linux@googlemail.com \
--to=vda.linux@googlemail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.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;
as well as URLs for NNTP newsgroup(s).