Loading...
gen/FreeBSD/exec.3 Libc-320 Libc-391
--- Libc/Libc-320/gen/FreeBSD/exec.3
+++ Libc/Libc-391/gen/FreeBSD/exec.3
@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)exec.3	8.3 (Berkeley) 1/24/94
-.\" $FreeBSD: src/lib/libc/gen/exec.3,v 1.18 2002/12/19 09:40:21 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/exec.3,v 1.23 2003/09/10 19:24:32 ru Exp $
 .\"
 .Dd January 24, 1994
 .Dt EXEC 3
@@ -41,7 +41,8 @@
 .Nm execle ,
 .Nm exect ,
 .Nm execv ,
-.Nm execvp
+.Nm execvp ,
+.Nm execvP
 .Nd execute a file
 .Sh LIBRARY
 .Lb libc
@@ -49,17 +50,25 @@
 .In unistd.h
 .Vt extern char **environ ;
 .Ft int
-.Fn execl "const char *path" "const char *arg" ...
-.Ft int
-.Fn execlp "const char *file" "const char *arg" ...
-.Ft int
-.Fn execle "const char *path" "const char *arg" ...
+.Fn execl "const char *path" "const char *arg" ... /* "(char *)0" */
+.Ft int
+.Fn execlp "const char *file" "const char *arg" ... /* "(char *)0" */
+.Ft int
+.Fo execle
+.Fa "const char *path" "const char *arg" ...
+.Fa /*
+.Bk -words
+.Fa "(char *)0" "char *const envp[]" */
+.Ek
+.Fc
 .Ft int
 .Fn exect "const char *path" "char *const argv[]" "char *const envp[]"
 .Ft int
 .Fn execv "const char *path" "char *const argv[]"
 .Ft int
 .Fn execvp "const char *file" "char *const argv[]"
+.Ft int
+.Fn execvP "const char *file" "const char *search_path" "char *const argv[]"
 .Sh DESCRIPTION
 The
 .Nm exec
@@ -99,8 +108,9 @@
 The
 .Fn exect ,
 .Fn execv ,
-and
-.Fn execvp
+.Fn execvp ,
+and
+.Fn execvP
 functions provide an array of pointers to null-terminated strings that
 represent the argument list available to the new program.
 The first argument, by convention, should point to the file name associated
@@ -134,23 +144,31 @@
 Some of these functions have special semantics.
 .Pp
 The functions
-.Fn execlp
-and
-.Fn execvp
+.Fn execlp ,
+.Fn execvp ,
+and
+.Fn execvP
 will duplicate the actions of the shell in searching for an executable file
 if the specified file name does not contain a slash
 .Dq Li /
 character.
-The search path is the path specified in the environment by
+For
+.Fn execlp
+and
+.Fn execvp ,
+search path is the path specified in the environment by
 .Dq Ev PATH
 variable.
 If this variable isn't specified,
 the default path is set according to the
 .Dv _PATH_DEFPATH
 definition in
-.Aq paths.h ,
+.In paths.h ,
 which is set to
 .Dq Ev /usr/bin:/bin .
+For
+.Fn execvP ,
+the search path is specified as an argument to the function.
 In addition, certain errors are treated specially.
 .Pp
 If an error is ambiguous (for simplicity, we shall consider all
@@ -206,9 +224,10 @@
 The
 .Fn execl ,
 .Fn execle ,
-.Fn execlp
-and
-.Fn execvp
+.Fn execlp ,
+.Fn execvp
+and
+.Fn execvP
 functions
 may fail and set
 .Va errno
@@ -300,3 +319,7 @@
 functions
 conform to
 .St -p1003.1-88 .
+The
+.Fn execvP
+function first appeared in
+.Fx 5.2 .