Re: How to locate implementation of a specific function in glibc source code?



On 2006-11-25, Ronald <followait@xxxxxxx> wrote:
I tried to locate execv using:
(in the glib source dir)
grep "int execv" * -r
grep "int __execv" * -r

but failed.



execv lives in posix/execv.c
All it does is call __execve.

__execve appears to be implemented several times. Probably the one
you're looking for is sysdeps/unix/sysv/linux/execve.c, but try:

grep -r __execve sysdeps/

by the way, grepping for 'int execv' didn't work because most of the
function definitions have the return type on a separate line:

int
execv (const char *path, char *const argv[])
{

--
Ian Kilgore
echo "pfxz@xxxxxxxx" | tr pzfwxt ikagno
.