Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84651
b: refs/heads/master
c: 9cbab81
h: refs/heads/master
i:
  84649: 2023f2b
  84647: 9bf711b
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Feb 8, 2008
1 parent 5a6df83 commit 959df5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee7c82da830ea860b1f9274f1f0cdf99f206e7c2
refs/heads/master: 9cbab8100538efdd93aeae6fc37787d986f2f558
12 changes: 4 additions & 8 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,7 @@ static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
}
allowed = 1;

retval = 0;
if (task_is_stopped_or_traced(p)) {
/*
* It's stopped now, so it might later
Expand All @@ -1524,8 +1525,6 @@ static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
retval = wait_task_stopped(p, ret == 2,
(options & WNOWAIT), infop,
stat_addr, ru);
if (retval != 0) /* He released the lock. */
goto end;
} else if (p->exit_state == EXIT_ZOMBIE) {
/*
* Eligible but we cannot release it yet:
Expand All @@ -1537,9 +1536,6 @@ static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
retval = wait_task_zombie(p,
(options & WNOWAIT), infop,
stat_addr, ru);
/* He released the lock. */
if (retval != 0)
goto end;
} else if (p->exit_state != EXIT_DEAD) {
check_continued:
/*
Expand All @@ -1552,9 +1548,9 @@ static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
retval = wait_task_continued(p,
(options & WNOWAIT), infop,
stat_addr, ru);
if (retval != 0) /* He released the lock. */
goto end;
}
if (retval != 0) /* tasklist_lock released */
goto end;
}
if (!flag) {
list_for_each_entry(p, &tsk->ptrace_children,
Expand Down Expand Up @@ -1590,7 +1586,7 @@ static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
remove_wait_queue(&current->signal->wait_chldexit,&wait);
if (infop) {
if (retval > 0)
retval = 0;
retval = 0;
else {
/*
* For a WNOHANG return, clear out all the fields
Expand Down

0 comments on commit 959df5d

Please sign in to comment.