OSDN Git Service

(split) LDP: Update original to LDP v3.63
[linuxjm/LDP_man-pages.git] / original / man2 / execve.2
index a2cd3aa..9b72ec6 100644 (file)
@@ -34,7 +34,7 @@
 .\" 2007-09-14 Ollie Wild <aaw@google.com>, mtk
 .\"     Add text describing limits on command-line arguments + environment
 .\"
-.TH EXECVE 2 2013-07-04 "Linux" "Linux Programmer's Manual"
+.TH EXECVE 2 2014-01-08 "Linux" "Linux Programmer's Manual"
 .SH NAME
 execve \- execute program
 .SH SYNOPSIS
@@ -62,7 +62,7 @@ By convention, the first of these strings should contain the filename
 associated with the file being executed.
 \fIenvp\fP is an array of strings, conventionally of the form
 \fBkey=value\fP, which are passed as environment to the new program.
-Both \fIargv\fP and \fIenvp\fP must be terminated by a NULL pointer.
+Both \fIargv\fP and \fIenvp\fP must be terminated by a null pointer.
 The argument vector and environment can be accessed by the
 called program's main function, when it is defined as:
 
@@ -290,7 +290,9 @@ where
 is the series of words pointed to by the
 .I argv
 argument of
-.BR execve ().
+.BR execve (),
+starting at
+.IR argv [1].
 
 For portable use,
 .I optional-arg
@@ -386,6 +388,10 @@ The filesystem is mounted
 .TP
 .B EFAULT
 .I filename
+or one of the pointers in the vectors
+.I argv
+or
+.I envp
 points outside your accessible address space.
 .TP
 .B EINVAL
@@ -500,7 +506,7 @@ or
 .I envp
 can be specified as NULL,
 which has the same effect as specifying these arguments
-as a pointer to a list containing a single NULL pointer.
+as a pointer to a list containing a single null pointer.
 .B "Do not take advantage of this misfeature!"
 It is nonstandard and nonportable:
 on most other UNIX systems doing this will result in an error
@@ -583,8 +589,8 @@ main(int argc, char *argv[])
     char *newenviron[] = { NULL };
 
     if (argc != 2) {
-       fprintf(stderr, "Usage: %s <file\-to\-exec>\\n", argv[0]);
-       exit(EXIT_FAILURE);
+        fprintf(stderr, "Usage: %s <file\-to\-exec>\\n", argv[0]);
+        exit(EXIT_FAILURE);
     }
 
     newargv[0] = argv[1];