Fix taking exit status when wait4()-ing stopped
This commit is contained in:
committed by
Tomoki Shirasawa
parent
95dd193fd6
commit
f28eb0a672
@@ -327,9 +327,9 @@ static int wait_stopped(struct process *proc, struct fork_tree_node *child, int
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Copy exit_status created in do_signal */
|
/* Copy exit_status created in do_signal */
|
||||||
int *exit_status = (child->ptrace & PT_TRACED) ?
|
int *exit_status = child->status == PS_STOPPED ?
|
||||||
&child->exit_status :
|
&child->group_exit_status :
|
||||||
&child->group_exit_status;
|
&child->exit_status;
|
||||||
|
|
||||||
/* Skip this process because exit_status has been reaped. */
|
/* Skip this process because exit_status has been reaped. */
|
||||||
if (!*exit_status) {
|
if (!*exit_status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user