From: Oleg Nesterov Date: Thu, 7 Jul 2011 19:33:54 +0000 (+0200) Subject: has_stopped_jobs: s/task_is_stopped/SIGNAL_STOP_STOPPED/ X-Git-Tag: v3.1-rc1~308^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=961c4675c75112717705fa5c0c53cb9664051479;p=pandora-kernel.git has_stopped_jobs: s/task_is_stopped/SIGNAL_STOP_STOPPED/ has_stopped_jobs() naively checks task_is_stopped(group_leader). This was always wrong even without ptrace, group_leader can be dead. And given that ptrace can change the state to TRACED this is wrong even in the single-threaded case. Change the code to check SIGNAL_STOP_STOPPED and simplify the code, retval + break/continue doesn't make this trivial code more readable. We could probably add the usual "|| signal->group_stop_count" check but I don't think this makes sense, the task can start the group-stop right after the check anyway. Signed-off-by: Oleg Nesterov Acked-by: Tejun Heo --- Reading git-diff-tree failed