Re: [PATCH 7/8] taskstats: fix stats->ac_exitcode to work on threads and use group_exit_code

2007-09-26 Thread Guillaume Chazarain
Le Wed, 26 Sep 2007 22:47:54 +0200, roel <[EMAIL PROTECTED]> 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 ?

Re: [PATCH 7/8] taskstats: fix stats->ac_exitcode to work on threads and use group_exit_code

2007-09-26 Thread roel
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; > + >

[PATCH 7/8] taskstats: fix stats->ac_exitcode to work on threads and use group_exit_code

2007-09-26 Thread Guillaume Chazarain
Threads also have an exit code on their own, so report it in TASKSTATS_CMD_ATTR_PID. For TASKSTATS_CMD_ATTR_TGID, instead of relying only on the exit code of the leader, we use task->signal->group_exit_code if not null as suggested by Oleg Nesterov. Also, document that as of this patch,

[PATCH 7/8] taskstats: fix stats->ac_exitcode to work on threads and use group_exit_code

2007-09-26 Thread Guillaume Chazarain
Threads also have an exit code on their own, so report it in TASKSTATS_CMD_ATTR_PID. For TASKSTATS_CMD_ATTR_TGID, instead of relying only on the exit code of the leader, we use task->signal->group_exit_code if not null as suggested by Oleg Nesterov. Also, document that as of this patch,

[PATCH 7/8] taskstats: fix stats-ac_exitcode to work on threads and use group_exit_code

2007-09-26 Thread Guillaume Chazarain
Threads also have an exit code on their own, so report it in TASKSTATS_CMD_ATTR_PID. For TASKSTATS_CMD_ATTR_TGID, instead of relying only on the exit code of the leader, we use task-signal-group_exit_code if not null as suggested by Oleg Nesterov. Also, document that as of this patch,

[PATCH 7/8] taskstats: fix stats-ac_exitcode to work on threads and use group_exit_code

2007-09-26 Thread Guillaume Chazarain
Threads also have an exit code on their own, so report it in TASKSTATS_CMD_ATTR_PID. For TASKSTATS_CMD_ATTR_TGID, instead of relying only on the exit code of the leader, we use task-signal-group_exit_code if not null as suggested by Oleg Nesterov. Also, document that as of this patch,

Re: [PATCH 7/8] taskstats: fix stats-ac_exitcode to work on threads and use group_exit_code

2007-09-26 Thread roel
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; +

Re: [PATCH 7/8] taskstats: fix stats-ac_exitcode to work on threads and use group_exit_code

2007-09-26 Thread Guillaume Chazarain
Le Wed, 26 Sep 2007 22:47:54 +0200, roel [EMAIL PROTECTED] 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;