Oleg Nesterov <oleg@tv-sign.ru> writes:Thinking about this set of problems. Testing SIGNAL_STOP_STOPPED seems more correct then testing TASK_STOPPED. It ensures we don't have a race, and except for ptrace the only way to stop a task triggers SIGNAL_STOP_STOPPED. We need a similar flag for thread group exit, to mark when every task in the thread group has exited. With those in place we can have race free tests of our status. /proc/<tgid>/status needs to be updated to use those the per signal struct status bits as well. As for the exit_code, we set tsk->exit_code = sig->group_exit_code so that doesn't seem to be a problem either. So to get a task group status looking at bits on the signal struct looks like the right approach, as this ensures we can avoid races in setting the status, and we don't need to test a dozen other fields. There is still some value in my other approach but even it will have small races if we continue look at per task status bits when what we want is a per thread group status. Eric --
| Cliffe | Re: [RFC 0/5] [TALPA] Intro to a linux interface for on access scanning |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Andrew Morton | Re: [RFC/PATCH] Documentation of kernel messages |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Radu Rendec | Endianness problem with u32 classifier hash masks |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
git: | |
