Move sv_onexit() sysentvec hook slightly later

after itimers are stopped.  This makes it more usable for e.g. native FreeBSD
ABI sysentvecs.

Reviewed by:	dchagin, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D30987
This commit is contained in:
Konstantin Belousov 2021-07-01 21:06:42 +03:00
parent 71ab344524
commit 55976ce11a

View file

@ -340,9 +340,6 @@ exit1(struct thread *td, int rval, int signo)
itimers_exit(p);
if (p->p_sysent->sv_onexit != NULL)
p->p_sysent->sv_onexit(p);
/*
* Check if any loadable modules need anything done at process exit.
* E.g. SYSV IPC stuff.
@ -374,6 +371,8 @@ exit1(struct thread *td, int rval, int signo)
PROC_UNLOCK(p);
umtx_thread_exit(td);
if (p->p_sysent->sv_onexit != NULL)
p->p_sysent->sv_onexit(p);
seltdfini(td);
/*