Guillaume Chazarain wrote:

[...]

> @@ -65,13 +65,15 @@ void bacct_add_tsk(struct taskstats *stats, struct 
> task_struct *tsk)
>  void bacct_fill_threadgroup(struct taskstats *stats, struct task_struct *tsk,
>                           bool tg_stats)
>  {
> +     int group_exit_code;
> +
>       fill_wall_times(stats, tsk);
>  
> -     if (thread_group_leader(tsk)) {
> -             stats->ac_exitcode = tsk->exit_code;
> -             if (tsk->flags & PF_FORKNOEXEC)
> -                     stats->ac_flag |= AFORK;
> -     }
> +     if (thread_group_leader(tsk) && ((tsk->flags & PF_FORKNOEXEC)))

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

> +             stats->ac_flag |= AFORK;
> +
> +     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;
                
        } else {
                group_exit_code = 0;
                stats->ac_exitcode = tsk->exit_code;
        }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to