Index: sys/kern/kern_exit.c =================================================================== RCS file: /cvsroot/src/sys/kern/kern_exit.c,v retrieving revision 1.293 diff -p -u -r1.293 kern_exit.c --- sys/kern/kern_exit.c 5 Dec 2021 08:13:12 -0000 1.293 +++ sys/kern/kern_exit.c 15 Jul 2023 15:13:19 -0000 @@ -527,12 +527,11 @@ exit1(struct lwp *l, int exitcode, int s wakeinit = 1; /* - * If this was the last child of our parent, notify - * parent, so in case he was wait(2)ing, he will + * Notify parent, so in case he was wait(2)ing or + * executing waitpid(2) with our pid, he will * continue. */ - if (LIST_FIRST(&old_parent->p_children) == NULL) - cv_broadcast(&old_parent->p_waitcv); + cv_broadcast(&old_parent->p_waitcv); } /* Reload parent pointer, since p may have been reparented above */