public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Chazarain <guichaz@yahoo.fr>
To: roel <12o3l@tiscali.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/8] taskstats: fix stats->ac_exitcode to work on threads and use group_exit_code
Date: Wed, 26 Sep 2007 22:55:38 +0200	[thread overview]
Message-ID: <20070926225538.1dbbe42e@localhost.localdomain> (raw)
In-Reply-To: <46FAC57A.3090309@tiscali.nl>

Le Wed, 26 Sep 2007 22:47:54 +0200,
roel <12o3l@tiscali.nl> a écrit :

> > +	if (thread_group_leader(tsk) && ((tsk->flags & PF_FORKNOEXEC)))
> 
> 	if (thread_group_leader(tsk) && (tsk->flags & PF_FORKNOEXEC))

Yeah, right, good catch.

> > +	group_exit_code = tg_stats ? tsk->signal->group_exit_code : 0;
> > +	stats->ac_exitcode = group_exit_code ? : tsk->exit_code;
> 
> Isn't this just confusing? why not
> 
> 	if (tg_stats) {
> 		group_exit_code = tsk->signal->group_exit_code;
> 		stats->ac_exitcode = group_exit_code;

Because in this case if group_exit_code is null, we want
tsk->exit_code, not 0.

> 		
> 	} else {
> 		group_exit_code = 0;
> 		stats->ac_exitcode = tsk->exit_code;
> 	}

Andrew is not interested at the moment in this series (that replaces
all my previous patches on taskstats, for info), but thank you for the
review.


-- 
Guillaume

  reply	other threads:[~2007-09-26 20:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26 16:28 [PATCH 1/8] taskstats: fix indentation of long argument lists Guillaume Chazarain
2007-09-26 16:28 ` [PATCH 2/8] taskstats: split the basic accounting fields Guillaume Chazarain
2007-09-26 16:28 ` [PATCH 3/8] taskstats: split the extended " Guillaume Chazarain
2007-09-26 16:28 ` [PATCH 4/8] taskstats: separate PID/TGID stats producers to complete the TGID ones Guillaume Chazarain
2007-09-26 16:28 ` [PATCH 5/8] taskstats: factor out version and context switch accounting Guillaume Chazarain
2007-09-26 16:28 ` [PATCH 6/8] taskstats: tell fill_threadgroup_stats() if it replies with PID or TGID stats Guillaume Chazarain
2007-09-26 16:28 ` [PATCH 7/8] taskstats: fix stats->ac_exitcode to work on threads and use group_exit_code Guillaume Chazarain
2007-09-26 20:47   ` roel
2007-09-26 20:55     ` Guillaume Chazarain [this message]
2007-09-26 16:28 ` [PATCH 8/8] taskstats: avoid breaking binary compatibility between taskstats v6 and before Guillaume Chazarain
  -- strict thread matches above, loose matches on Subject: below --
2007-09-26 17:08 [PATCH 1/8] taskstats: fix indentation of long argument lists Guillaume Chazarain
2007-09-26 17:08 ` [PATCH 7/8] taskstats: fix stats->ac_exitcode to work on threads and use group_exit_code Guillaume Chazarain

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=20070926225538.1dbbe42e@localhost.localdomain \
    --to=guichaz@yahoo.fr \
    --cc=12o3l@tiscali.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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