Convert prsignal() into a real function
authorclaudio <claudio@openbsd.org>
Wed, 9 Oct 2024 08:39:49 +0000 (08:39 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 9 Oct 2024 08:39:49 +0000 (08:39 +0000)
commit2d5a42141c9ba258f3db4b3f809b4ec766927ba2
treebd5d2ddea6f1b723f8aa8ddab9d51c7d8abd8876
parent76b186338221fc4a5d8cf12b3cee1315239021ce
Convert prsignal() into a real function

Also do not use ps_mainproc as the thread the signal is send to. Sending
a signal to ps_mainproc may not work reliably if it already exited. Use
TAILQ_FIRST(&pr->ps_threads) instead but first check that the process has
not yet entered exit1().

OK mpi@
sys/kern/kern_sig.c
sys/sys/signalvar.h