Differences between version 3 and predecessor to the previous major change of exec(3).
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 3 | Last edited on Saturday, January 29, 2005 5:00:25 pm | by JohnMcPherson | Revert |
Older page: | version 1 | Last edited on Tuesday, June 4, 2002 12:24:17 am | by perry | Revert |
@@ -1,42 +1,31 @@
-EXEC
!!!EXEC
-NAME
-SYNOPSIS
-DESCRIPTION
-RETURN VALUE
-FILES
-ERRORS
-SEE ALSO
-COMPATIBILITY
-CONFORMING TO
+
----
!!NAME
execl, execlp, execle, execv, execvp - execute a file
!!SYNOPSIS
-__#include __
+<pre>
+#include <uinstd.h>
-__extern char **environ;__
+extern char **environ;
-__int execl( const char *__''path''__, const char
-*__''arg''__, ...);
-int execlp( const char *__''file''__, const char
-*__''arg''__, ...);
-int execle( const char *__''path''__, const char
-*__''arg'' __, ..., char * const__
-''envp''__[[]);
-int execv( const char *__''path''__, char *const__
-''argv''__[[]);
-int execvp( const char *__''file''__, char *const__
-''argv''__[[]);__
-!!DESCRIPTION
+int execl( const char *__''path''__, const char *__''arg''__, ...);
+int execlp( const char *__''file''__, const char *__''arg''__, ...);
+int execle( const char *__''path''__, const char *__''arg''__,... , char * const__ ''envp''__~[]);
+int execv( const char *__''path''__, char *const __''argv''__~[]);
+int execvp( const char *__''file''__, char *const __''argv''__~[]);
+</pre>
+
+
+!!DESCRIPTION
The __exec__ family of functions replaces the current
process image with a new process image. The functions
described in this manual page are front-ends for the
@@ -93,9 +82,9 @@
specially.
If permission is denied for a file (the attempted
-__execve__ returned __
EACCES__
), these functions will
+__execve__ returned [
EACCES]
), these functions will
continue searching the rest of the search path. If no other
file is found, however, they will return with the global
variable ''errno'' set to __EACCES__.
@@ -104,8 +93,10 @@
__execve__ returned __ENOEXEC__), these functions will
execute the shell with the path of the file as its first
argument. (If this attempt fails, no further searching is
done.)
+
+
!!RETURN VALUE
If any of the __exec__ functions returns, an error will
@@ -133,29 +124,30 @@
On some other systems the default path (used when the
environment does not contain the variable __PATH__) has
the current working directory listed after ''/bin'' and
''/usr/bin'', as an anti-Trojan-horse measure. Linux uses
-here the traditional
-''
+here the traditional "current directory first" default path.
The behavior of __execlp__ and __execvp__ when errors
occur while attempting to execute the file is historic
practice, but has not traditionally been documented and is
-not specified by the POSIX standard. BSD (and possibly other
-systems) do an automatic sleep and retry if ETXTBSY is
+not specified by the [
POSIX]
standard. [
BSD]
(and possibly other
+systems) do an automatic sleep and retry if [
ETXTBSY]
is
encountered. Linux treats it as a hard error and returns
immediately.
Traditionally, the functions __execlp__ and __execvp__
ignored all errors except for the ones described above and
-__
ENOMEM__
and __
E2BIG__
, upon which they returned.
+[
ENOMEM]
and [
E2BIG]
, upon which they returned.
They now return if any error other than the ones described
above occurs.
+
+
!!CONFORMING TO
__execl__, __execv__, __execle__, __execlp__ and
__execvp__ conform to IEEE Std1003.1-88
-(``POSIX.1'').
+(``[
POSIX]
.1'').
----