Subject: Re: Where is source for exec functions?
To: Dan Harrison <bsdman@techdex.com>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 08/13/2004 10:37:30
In article <p05111b00bd3fffd55fcc@[192.168.97.9]>,
	bsdman@techdex.com (Dan Harrison) writes:
> Hello. I'm not sure where to post this, so hopefully I will get an answer.
> 
> I can't seem to find the source for the exec functions like execl() 
> and execve(). I can find their defenitions in unistd.h, but where's 
> the source code? Is it in assembler or built in or am I just missing 
> it?

execl(3) is a libc function. It and its cohorts may be found in
the directory "lib/libc/gen". execve(2) is the system call, which
does the dirty work, so the generated "source" is just a stub which
invokes the syscall mechanism. The actual function, which is invoked
in the kernel's context, is sys_execve() in "sys/kern/kern_exec.c".

-- 
Frederick