From: claudio Date: Wed, 24 Jul 2024 15:30:17 +0000 (+0000) Subject: Remove the (pr->ps_single->p_flag & P_SUSPSINGLE) == 0 check since it X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8c845098944b3ba40fd9cbb0cb91fe46a596d851;p=openbsd Remove the (pr->ps_single->p_flag & P_SUSPSINGLE) == 0 check since it is always true. Also consitently wrap all flag checks into parantheses. OK kettenis@ guenther@ --- diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index b4151c99591..43ef7a37fd9 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.226 2024/07/24 12:17:31 mpi Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.227 2024/07/24 15:30:17 claudio Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -550,10 +550,9 @@ loop: return (0); } if ((options & WTRAPPED) && - pr->ps_flags & PS_TRACED && + (pr->ps_flags & PS_TRACED) && (pr->ps_flags & PS_WAITED) == 0 && pr->ps_single && - pr->ps_single->p_stat == SSTOP && - (pr->ps_single->p_flag & P_SUSPSINGLE) == 0) { + pr->ps_single->p_stat == SSTOP) { if (single_thread_wait(pr, 0)) goto loop; @@ -578,8 +577,8 @@ loop: if (p->p_stat == SSTOP && (pr->ps_flags & PS_WAITED) == 0 && (p->p_flag & P_SUSPSINGLE) == 0 && - (pr->ps_flags & PS_TRACED || - options & WUNTRACED)) { + ((pr->ps_flags & PS_TRACED) || + (options & WUNTRACED))) { if ((options & WNOWAIT) == 0) atomic_setbits_int(&pr->ps_flags, PS_WAITED);