From 63e2d201376d16568b49f7c776863e38c07d0789 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 3 Jan 2018 01:22:53 +0100 Subject: [PATCH] kernel: Treat WSTOPPED synonymous to WUNTRACED. On other systems their values are usually aliased. We defined them as two different values, but didn't handle WSTOPPED anywhere. The check is now simply extended to cover both bits. --- src/system/kernel/team.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system/kernel/team.cpp b/src/system/kernel/team.cpp index 8c85d0bd78..52b72984d6 100644 --- a/src/system/kernel/team.cpp +++ b/src/system/kernel/team.cpp @@ -2322,8 +2322,8 @@ get_job_control_entry(team_job_control_children& children, pid_t id) \param id The match criterion. \param flags Specifies which children shall be considered. Dead children always are. Stopped children are considered when \a flags is ORed - bitwise with \c WUNTRACED, continued children when \a flags is ORed - bitwise with \c WCONTINUED. + bitwise with \c WUNTRACED or \c WSTOPPED, continued children when + \a flags is ORed bitwise with \c WCONTINUED. \return The first matching entry or \c NULL, if none matches. */ static job_control_entry* @@ -2334,7 +2334,7 @@ get_job_control_entry(Team* team, pid_t id, uint32 flags) if (entry == NULL && (flags & WCONTINUED) != 0) entry = get_job_control_entry(team->continued_children, id); - if (entry == NULL && (flags & WUNTRACED) != 0) + if (entry == NULL && (flags & (WUNTRACED | WSTOPPED)) != 0) entry = get_job_control_entry(team->stopped_children, id); return entry;