MCPcopy Create free account
hub / github.com/F-Stack/f-stack / post_execve

Function post_execve

freebsd/kern/kern_exec.c:315–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void
316post_execve(struct thread *td, int error, struct vmspace *oldvmspace)
317{
318 struct proc *p;
319
320 KASSERT(td == curthread, ("non-current thread %p", td));
321 p = td->td_proc;
322 if ((p->p_flag & P_HADTHREADS) != 0) {
323 PROC_LOCK(p);
324 /*
325 * If success, we upgrade to SINGLE_EXIT state to
326 * force other threads to suicide.
327 */
328 if (error == EJUSTRETURN)
329 thread_single(p, SINGLE_EXIT);
330 else
331 thread_single_end(p, SINGLE_BOUNDARY);
332 PROC_UNLOCK(p);
333 }
334 exec_cleanup(td, oldvmspace);
335}
336
337/*
338 * kern_execve() has the astonishing property of not always returning to

Callers 3

sys_execveFunction · 0.85
sys_fexecveFunction · 0.85
sys___mac_execveFunction · 0.85

Calls 3

thread_singleFunction · 0.85
thread_single_endFunction · 0.85
exec_cleanupFunction · 0.85

Tested by

no test coverage detected