summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/execve.2
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2001-03-14 04:01:59 +0000
committeraaron <aaron@openbsd.org>2001-03-14 04:01:59 +0000
commit11576a99e68613cc3da064c38330ff32f16e4238 (patch)
treecd65d68fb000c07cf5894dce5723a491e722b9d1 /lib/libc/sys/execve.2
parentKNF (diff)
downloadwireguard-openbsd-11576a99e68613cc3da064c38330ff32f16e4238.tar.xz
wireguard-openbsd-11576a99e68613cc3da064c38330ff32f16e4238.zip
Move description of exect() to execve(2) man page. Add a note about exect() not
being portable.
Diffstat (limited to 'lib/libc/sys/execve.2')
-rw-r--r--lib/libc/sys/execve.219
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2
index 8a82b979af6..68522a983af 100644
--- a/lib/libc/sys/execve.2
+++ b/lib/libc/sys/execve.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: execve.2,v 1.16 2000/10/18 05:12:09 aaron Exp $
+.\" $OpenBSD: execve.2,v 1.17 2001/03/14 04:01:59 aaron Exp $
.\" $NetBSD: execve.2,v 1.9 1995/02/27 12:32:25 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -38,12 +38,15 @@
.Dt EXECVE 2
.Os
.Sh NAME
-.Nm execve
+.Nm execve ,
+.Nm exect
.Nd execute a file
.Sh SYNOPSIS
.Fd #include <unistd.h>
.Ft int
.Fn execve "const char *path" "const char *argv[]" "const char *envp[]"
+.Ft int
+.Fn exect "const char *path" "char *const argv[]" "char *const envp[]"
.Sh DESCRIPTION
.Fn execve
transforms the calling process into a new process.
@@ -195,6 +198,14 @@ and
.Fa argv
points to the array of character pointers
to the arguments themselves.
+.Pp
+The
+.Fn exect
+function is equivalent to
+.Fn execve
+with the additional property that is executes the file with the program
+tracing facilities enabled (see
+.Xr ptrace 2 ) .
.Sh RETURN VALUES
As the
.Fn execve
@@ -275,6 +286,10 @@ the system file table was found to be full.
.Xr execl 3 ,
.Xr exit 3 ,
.Xr environ 7
+.Sh COMPATIBILITY
+The
+.Fn exect
+function should not be used in portable applications.
.Sh HISTORY
The
.Fn execve