summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2001-03-14 04:02:01 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2001-03-14 04:02:01 +0000
commitca102b8c7c9d7f7f56d1a05d1752249787dde7ce (patch)
tree93476a0c68bffe34575aa39a26e35baf6005bd54 /lib/libc/sys
parent5fa7af14537e02bed8529ebebd334b16c7905af6 (diff)
Move description of exect() to execve(2) man page. Add a note about exect() not
being portable.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/Makefile.inc3
-rw-r--r--lib/libc/sys/execve.219
2 files changed, 19 insertions, 3 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index fc229c9ba6e..f5be72d2c2e 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.42 2001/03/09 15:13:48 art Exp $
+# $OpenBSD: Makefile.inc,v 1.43 2001/03/14 04:01:59 aaron Exp $
# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $
# @(#)Makefile.inc 8.1 (Berkeley) 6/17/93
@@ -197,6 +197,7 @@ MLINKS+=chown.2 fchown.2
MLINKS+=chown.2 lchown.2
MLINKS+=clock_gettime.2 clock_settime.2
MLINKS+=clock_gettime.2 clock_getres.2
+MLINKS+=execve.2 exect.2
MLINKS+=fhopen.2 fhstat.2 fhopen.2 fhstatfs.2
MLINKS+=getgid.2 getegid.2
MLINKS+=getitimer.2 setitimer.2
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