.TH execvpe() "" "" "General Function (libc)"
.PC "Execute a load module"
\fBexecvp(\fIfile, argv\^\fB, \fIenv\^\fB)\fR
\fBchar *\fIfile, \fB*\fIargv\^\fB[], *\fIenv\^\fB[];\fR
.PP
The function
.B execvpe()
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 .
The argument
.I env
is the address of an array of pointers to strings that define
.IR file 's
environment.
This allows
.B execvpe()
to pass a new environment to the program being executed.
.PP
Unlike the related call
.BR execv() ,
.B execvpe()
searches for
.I file
in all of the directories named in the environmental variable
.BR PATH \(em
that is, the current
.BR PATH ,
not the one contained within the environmented pointed to by
.IR env .
.PP
For more information on program execution, see
.BR execution .
.SH "See Also"
.Xr "environ," environ
.Xr "execution," execution
.Xr "execv()," execv
.Xr "execve()," execve
.Xr "libc" libc
.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.
.PP
.B execvpe()
is not part of the SVID specification.
Therefore, it may not be present on non-\*(CO operating systems.
