diff options
| author | Dmitry Chagin <dchagin@FreeBSD.org> | 2021-07-20 06:55:14 +0000 |
|---|---|---|
| committer | Dmitry Chagin <dchagin@FreeBSD.org> | 2021-07-20 06:55:14 +0000 |
| commit | 62ba4cd340670e901fbaab98766bd5490b4334bd (patch) | |
| tree | da20872b5c9d4b8690bfc2a97aa4f114fb714da6 /sys | |
| parent | b39fa4770dd19ff32b2d70622521135dd384c7c1 (diff) | |
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/kern_exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index edb4ad1af3c1..eff48b2c86f3 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1072,8 +1072,6 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) 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); EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp); @@ -1165,6 +1163,8 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) vmspace->vm_ssize = sgrowsiz >> PAGE_SHIFT; vmspace->vm_maxsaddr = (char *)stack_addr; + if (sv->sv_onexec != NULL) + sv->sv_onexec(p, imgp); return (0); } |
