<dec f='src/src/sys/sys/exec.h' l='271' type='int check_exec(struct lwp * , struct exec_package * , struct pathbuf * )'/>
<use f='src/src/sys/kern/exec_script.c' l='287' u='c' c='exec_script_makecmds'/>
<def f='src/src/sys/kern/kern_exec.c' l='331' ll='514' type='int check_exec(struct lwp * l, struct exec_package * epp, struct pathbuf * pb)'/>
<use f='src/src/sys/kern/kern_exec.c' l='757' u='c' c='execve_loadvm'/>
<doc f='src/src/sys/kern/kern_exec.c' l='306'>/*
 * check exec:
 * given an &quot;executable&quot; described in the exec package&apos;s namei info,
 * see what we can do with it.
 *
 * ON ENTRY:
 *	exec package with appropriate namei info
 *	lwp pointer of exec&apos;ing lwp
 *	NO SELF-LOCKED VNODES
 *
 * ON EXIT:
 *	error:	nothing held, etc.  exec header still allocated.
 *	ok:	filled exec package, executable&apos;s vnode (unlocked).
 *
 * EXEC SWITCH ENTRY:
 * 	Locked vnode to check, exec package, proc.
 *
 * EXEC SWITCH EXIT:
 *	ok:	return 0, filled exec package, executable&apos;s vnode (unlocked).
 *	error:	destructive:
 *			everything deallocated execept exec header.
 *		non-destructive:
 *			error code, executable&apos;s vnode (unlocked),
 *			exec header unmodified.
 */</doc>
