.TH execvp() "" "" "General Function (libc)"
.PC "Execute a load module"
.B "#include <unistd.h>"
\fBexecvp(\fIfile, argv\^\fB)\fR
\fBchar *\fIfile, \fB*\fIargv\^\fB[];\fR
.PP
The function
.B execvp()
calls the \*(CO system call
.B execve()
to execute a program.
It specifies arguments as a single, NULL-terminated array of parameters, called
.IR argv .
Unlike the related call
.BR execv() ,
.B execvp()
searches for
.I file
in all of the directories named in the environmental variable
.BR PATH .
For more information on program execution, see
.BR execution .
.SH "See Also"
.Xr "environ," environ
.Xr "execution," execution
.Xr "execve()," execve
.Xr "libc," libc
.Xr "unistd.h" unistd.h
.br
\*(PX Standard, \(sc3.1.2
.SH Diagnostics
.B execvp()
does not return if successful.
It returns \-1 for errors, such as
.I file
being nonexistent,
not accessible with execute permission, having a bad format,
or too large to fit in memory.
