Make sure the original thread is blocked until any other threads are
authorguenther <guenther@openbsd.org>
Thu, 17 Apr 2014 14:52:50 +0000 (14:52 +0000)
committerguenther <guenther@openbsd.org>
Thu, 17 Apr 2014 14:52:50 +0000 (14:52 +0000)
commit665e07d6cfe372a9cb7c136fce813ece1d8a4be8
treec17e5ed747b43b8e5938517045eae51862658791
parenteb063acfa7731a82464977c7eabb10b42d40b4dd
Make sure the original thread is blocked until any other threads are
completely detached from the process before letting it exit, so that
sleeping in systrace_exit() doesn't reorder them and lead to a panic.

Panic reported by Fabian Raetz (fabian.raetz (at) gmail.com)
ok tedu@
sys/kern/kern_exit.c