diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-03-14 04:02:01 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-03-14 04:02:01 +0000 |
commit | ca102b8c7c9d7f7f56d1a05d1752249787dde7ce (patch) | |
tree | 93476a0c68bffe34575aa39a26e35baf6005bd54 | |
parent | 5fa7af14537e02bed8529ebebd334b16c7905af6 (diff) |
Move description of exect() to execve(2) man page. Add a note about exect() not
being portable.
-rw-r--r-- | lib/libc/gen/Makefile.inc | 6 | ||||
-rw-r--r-- | lib/libc/gen/exec.3 | 20 | ||||
-rw-r--r-- | lib/libc/sys/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libc/sys/execve.2 | 19 |
4 files changed, 26 insertions, 22 deletions
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 819eacc8839..71dc08e9e8b 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.27 2000/11/21 00:51:30 millert Exp $ +# $OpenBSD: Makefile.inc,v 1.28 2001/03/14 04:02:00 aaron Exp $ # gen sources .PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/gen ${LIBCSRCDIR}/gen @@ -78,8 +78,8 @@ MLINKS+=directory.3 closedir.3 directory.3 dirfd.3 directory.3 opendir.3 \ directory.3 telldir.3 directory.3 readdir_r.3 MLINKS+=err.3 verr.3 err.3 errx.3 err.3 verrx.3 err.3 warn.3 err.3 vwarn.3 \ err.3 warnx.3 err.3 vwarnx.3 -MLINKS+=exec.3 execl.3 exec.3 execle.3 exec.3 execlp.3 exec.3 exect.3 \ - exec.3 execv.3 exec.3 execvp.3 +MLINKS+=exec.3 execl.3 exec.3 execle.3 exec.3 execlp.3 exec.3 execv.3 \ + exec.3 execvp.3 MLINKS+=fts.3 fts_open.3 fts.3 fts_read.3 fts.3 fts_children.3 \ fts.3 fts_set.3 fts.3 fts_close.3 MLINKS+=isinf.3 isnan.3 isinf.3 isnanf.3 isinf.3 isinff.3 diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3 index 01091a41e04..e34ccf90947 100644 --- a/lib/libc/gen/exec.3 +++ b/lib/libc/gen/exec.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: exec.3,v 1.11 2000/08/31 16:24:38 deraadt Exp $ +.\" $OpenBSD: exec.3,v 1.12 2001/03/14 04:02:00 aaron Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -38,7 +38,6 @@ .Nm execl , .Nm execlp , .Nm execle , -.Nm exect , .Nm execv , .Nm execvp .Nd execute a file @@ -52,8 +51,6 @@ .Ft int .Fn execle "const char *path" "const char *arg" ... "char *const envp[]" .Ft int -.Fn exect "const char *path" "char *const argv[]" "char *const envp[]" -.Ft int .Fn execv "const char *path" "char *const argv[]" .Ft int .Fn execvp "const char *file" "char *const argv[]" @@ -93,8 +90,7 @@ The list of arguments be terminated by a null pointer. .Pp The -.Fn exect , -.Fn execv , +.Fn execv and .Fn execvp functions provide an array of pointers to @@ -108,9 +104,7 @@ be terminated by a null pointer itself. .Pp The .Fn execle -and -.Fn exect -functions also specify the environment of the executed process by following +function also specifies the environment of the executed process by following the null pointer that terminates the list of arguments in the parameter list or the pointer to the @@ -172,10 +166,6 @@ returned these functions will sleep for several seconds, periodically re-attempting to execute the file. .Pp -The function -.Fn exect -executes a file with the program tracing facilities enabled (see -.Xr ptrace 2 ) . .Sh RETURN VALUES If any of the .Xr exec @@ -191,7 +181,7 @@ default shell program .Sh ERRORS .Fn execl , .Fn execle , -.Fn execlp +.Fn execlp , and .Fn execvp may fail and set @@ -201,8 +191,6 @@ for any of the errors specified for the library functions and .Xr malloc 3 . .Pp -.Fn exect -and .Fn execv may fail and set .Va errno 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 |