Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_exec.c
Show First 20 Lines • Show All 1,146 Lines • ▼ Show 20 Lines | exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) | ||||
/* | /* | ||||
* vm_ssize and vm_maxsaddr are somewhat antiquated concepts, but they | * vm_ssize and vm_maxsaddr are somewhat antiquated concepts, but they | ||||
* are still used to enforce the stack rlimit on the process stack. | * are still used to enforce the stack rlimit on the process stack. | ||||
*/ | */ | ||||
vmspace->vm_ssize = sgrowsiz >> PAGE_SHIFT; | vmspace->vm_ssize = sgrowsiz >> PAGE_SHIFT; | ||||
vmspace->vm_maxsaddr = (char *)stack_addr; | vmspace->vm_maxsaddr = (char *)stack_addr; | ||||
if (sv->sv_onexec != NULL) | if (sv->sv_onexec != NULL) | ||||
sv->sv_onexec(p, imgp); | error = sv->sv_onexec(p, imgp); | ||||
return (0); | return (error); | ||||
kib: At this point, error is KERN_SUCCESS, which is some Mach error code. We never assume that it… | |||||
} | } | ||||
/* | /* | ||||
* Copy out argument and environment strings from the old process address | * Copy out argument and environment strings from the old process address | ||||
* space into the temporary string buffer. | * space into the temporary string buffer. | ||||
*/ | */ | ||||
int | int | ||||
exec_copyin_args(struct image_args *args, const char *fname, | exec_copyin_args(struct image_args *args, const char *fname, | ||||
▲ Show 20 Lines • Show All 859 Lines • Show Last 20 Lines |
At this point, error is KERN_SUCCESS, which is some Mach error code. We never assume that it has zero value. Please replace this fragment by e.g. the following