summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/execve.2
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/sys/execve.2')
-rw-r--r--lib/libc/sys/execve.228
1 files changed, 22 insertions, 6 deletions
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2
index ba47e6d..b9fb131 100644
--- a/lib/libc/sys/execve.2
+++ b/lib/libc/sys/execve.2
@@ -178,6 +178,23 @@ and
.Fa argv
points to the array of character pointers
to the arguments themselves.
+.Sh IMPLEMENTATION NOTES
+.Pp
+In the non-threaded library
+.Fn execve
+is implemented as the
+.Va execve
+syscall.
+.Pp
+In the threaded library, the
+.Va execve
+syscall is assembled to
+.Fn _thread_sys_execve
+and
+.Fn execve
+is implemented as a function which performs user-thread
+library re-initialization and then calls
+.Fn _thread_sys_execve .
.Sh RETURN VALUES
As the
.Fn execve
@@ -196,8 +213,6 @@ will fail and return to the calling process if:
.Bl -tag -width [ENAMETOOLONG]
.It Bq Er ENOTDIR
A component of the path prefix is not a directory.
-.It Bq Er EINVAL
-The pathname contains a character with the high-order bit set.
.It Bq Er ENAMETOOLONG
A component of a pathname exceeded 255 characters,
or an entire path name exceeded 1023 characters.
@@ -224,10 +239,10 @@ is allowed by the imposed maximum
.It Bq Er E2BIG
The number of bytes in the new process's argument list
is larger than the system-imposed limit.
-The limit in the system as released is 20480 bytes
+The limit in the system as released is 65536 bytes
.Pf ( Dv NCARGS
in
-.Ao Pa sys/param.h Ac .
+.Ao Pa sys/param.h Ac ) .
.It Bq Er EFAULT
The new process file is not as long as indicated by
the size values in its header.
@@ -250,12 +265,13 @@ the real
is ``root'', then the program has some of the powers
of a super-user as well.
.Sh SEE ALSO
-.Xr exit 2 ,
+.Xr _exit 2 ,
.Xr fork 2 ,
.Xr execl 3 ,
+.Xr exit 3 ,
.Xr environ 7
.Sh HISTORY
The
-.Nm
+.Fn execve
function call appeared in
.Bx 4.2 .
OpenPOWER on IntegriCloud