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 16 Apr 2022 04:51:10 -0000 @@ -631,6 +631,17 @@ retry: continue; lwp_lock(l2); l2->l_flag |= LW_WEXIT; + /* + * Wake up sibling threads that are blocked for a + * vforked child so that the process can exit. + */ + if (l2->l_vforkwaiting) { +printf("exit_lwps: pid=%d lwp=%p waking lwp=%p\n", p->p_pid, l, l2); + mutex_enter(&proc_lock); + l2->l_vforkwaiting = false; + cv_broadcast(&l2->l_waitcv); + mutex_exit(&proc_lock); + } if ((l2->l_stat == LSSLEEP && (l2->l_flag & LW_SINTR)) || l2->l_stat == LSSUSPENDED || l2->l_stat == LSSTOP) { l2->l_flag &= ~LW_DBGSUSPEND;