Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_exec.c
Show First 20 Lines • Show All 1,019 Lines • ▼ Show 20 Lines | |||||
* automatically on a page fault. | * automatically on a page fault. | ||||
*/ | */ | ||||
int | int | ||||
exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) | exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) | ||||
{ | { | ||||
int error; | int error; | ||||
struct proc *p = imgp->proc; | struct proc *p = imgp->proc; | ||||
struct vmspace *vmspace = p->p_vmspace; | struct vmspace *vmspace = p->p_vmspace; | ||||
struct thread *td = curthread; | |||||
vm_object_t obj; | vm_object_t obj; | ||||
struct rlimit rlim_stack; | struct rlimit rlim_stack; | ||||
vm_offset_t sv_minuser, stack_addr; | vm_offset_t sv_minuser, stack_addr; | ||||
vm_map_t map; | vm_map_t map; | ||||
u_long ssiz; | u_long ssiz; | ||||
imgp->vmspace_destroyed = 1; | imgp->vmspace_destroyed = 1; | ||||
imgp->sysent = sv; | imgp->sysent = sv; | ||||
td->td_pflags &= ~TDP_FAST_SIGBLOCK; | |||||
td->td_sigblock_ptr = NULL; | |||||
td->td_sigblock_val = 0; | |||||
/* May be called with Giant held */ | /* May be called with Giant held */ | ||||
EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp); | EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp); | ||||
/* | /* | ||||
* Blow away entire process VM, if address space not shared, | * Blow away entire process VM, if address space not shared, | ||||
* otherwise, create a new VM space so that other threads are | * otherwise, create a new VM space so that other threads are | ||||
* not disrupted | * not disrupted | ||||
▲ Show 20 Lines • Show All 782 Lines • Show Last 20 Lines |