mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
wait_task_stopped(): remove unneeded delay_group_leader check
wait_task_stopped() doesn't need the "delay_group_leader" parameter. If the child is not traced it must be a group leader. With or without subthreads ->group_stop_count == 0 when the whole task is stopped. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Mika Penttila <mika.penttila@kolumbus.fi> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
20686a309a
commit
1bad95c3be
1 changed files with 3 additions and 4 deletions
|
@ -1351,7 +1351,7 @@ static int wait_task_zombie(struct task_struct *p, int noreap,
|
||||||
* the lock and this task is uninteresting. If we return nonzero, we have
|
* the lock and this task is uninteresting. If we return nonzero, we have
|
||||||
* released the lock and the system call should return.
|
* released the lock and the system call should return.
|
||||||
*/
|
*/
|
||||||
static int wait_task_stopped(struct task_struct *p, int delayed_group_leader,
|
static int wait_task_stopped(struct task_struct *p,
|
||||||
int noreap, struct siginfo __user *infop,
|
int noreap, struct siginfo __user *infop,
|
||||||
int __user *stat_addr, struct rusage __user *ru)
|
int __user *stat_addr, struct rusage __user *ru)
|
||||||
{
|
{
|
||||||
|
@ -1365,8 +1365,7 @@ static int wait_task_stopped(struct task_struct *p, int delayed_group_leader,
|
||||||
if (unlikely(!task_is_stopped_or_traced(p)))
|
if (unlikely(!task_is_stopped_or_traced(p)))
|
||||||
goto unlock_sig;
|
goto unlock_sig;
|
||||||
|
|
||||||
if (delayed_group_leader && !(p->ptrace & PT_PTRACED) &&
|
if (!(p->ptrace & PT_PTRACED) && p->signal->group_stop_count > 0)
|
||||||
p->signal->group_stop_count > 0)
|
|
||||||
/*
|
/*
|
||||||
* A group stop is in progress and this is the group leader.
|
* A group stop is in progress and this is the group leader.
|
||||||
* We won't report until all threads have stopped.
|
* We won't report until all threads have stopped.
|
||||||
|
@ -1522,7 +1521,7 @@ repeat:
|
||||||
!(options & WUNTRACED))
|
!(options & WUNTRACED))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
retval = wait_task_stopped(p, ret == 2,
|
retval = wait_task_stopped(p,
|
||||||
(options & WNOWAIT), infop,
|
(options & WNOWAIT), infop,
|
||||||
stat_addr, ru);
|
stat_addr, ru);
|
||||||
} else if (p->exit_state == EXIT_ZOMBIE) {
|
} else if (p->exit_state == EXIT_ZOMBIE) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue