Temporary add stubs to the Linux emulation layer which calls the existing hook.
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
return (sv->sv_onexec != NULL ? sv->sv_onexec(p, imgp) : 0);