Add sv_onexec_old() sysent hook for exec event

(cherry picked from commit 71ab344524)
This commit is contained in:
Konstantin Belousov 2021-07-01 21:04:06 +03:00
parent bc28e9596c
commit 855fb8944c
2 changed files with 3 additions and 0 deletions

View file

@ -1057,6 +1057,8 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
sigfastblock_clear(td);
umtx_exec(p);
if (p->p_sysent->sv_onexec_old != NULL)
p->p_sysent->sv_onexec_old(td);
itimers_exec(p);
if (sv->sv_onexec != NULL)
sv->sv_onexec(p, imgp);

View file

@ -145,6 +145,7 @@ struct sysentvec {
u_long *sv_hwcap2; /* Value passed in AT_HWCAP2. */
const char *(*sv_machine_arch)(struct proc *);
vm_offset_t sv_fxrng_gen_base;
void (*sv_onexec_old)(struct thread *td);
void (*sv_onexec)(struct proc *, struct image_params *);
void (*sv_onexit)(struct proc *);
void (*sv_ontdexit)(struct thread *td);