[lkml]   [2014]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCHv4 RESEND man-pages 3/3] execveat.2: initial man page for execveat(2)
Signed-off-by: David Drysdale <>
man2/execveat.2 | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 132 insertions(+)
create mode 100644 man2/execveat.2

diff --git a/man2/execveat.2 b/man2/execveat.2
new file mode 100644
index 000000000000..fbbb9f824290
--- /dev/null
+++ b/man2/execveat.2
@@ -0,0 +1,132 @@
+.\" Copyright (c) 2014 Google, Inc.
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date. The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein. The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.TH EXECVEAT 2 2014-04-02 "Linux" "Linux Programmer's Manual"
+execveat \- execute program relative to a directory file descriptor
+.B #include <unistd.h>
+.BI "int execve(int " fd ", const char *" pathname ","
+.BI " char *const " argv "[], char *const " envp "[],"
+.BI " int " flags);
+.BR execveat ()
+system call executes the program pointed to by the combination of \fIfd\fP and \fIpathname\fP.
+.BR execveat ()
+system call operates in exactly the same way as
+.BR execve (2),
+except for the differences described in this manual page.
+If the pathname given in
+.I pathname
+is relative, then it is interpreted relative to the directory
+referred to by the file descriptor
+.I fd
+(rather than relative to the current working directory of
+the calling process, as is done by
+.BR execve (2)
+for a relative pathname).
+.I pathname
+is relative and
+.I fd
+is the special value
+.I pathname
+is interpreted relative to the current working
+directory of the calling process (like
+.BR execve (2)).
+.I pathname
+is absolute, then
+.I fd
+is ignored.
+.I pathname
+is NULL, then the file descriptor
+.I fd
+specifies the file to be executed.
+.I flags
+can either be 0, or include the following flag:
+If the file identified by
+.I fd
+and a non-NULL
+.I pathname
+is a symbolic link, then the call fails with the error
+On success,
+.BR execveat ()
+does not return. On error \-1 is returned, and
+.I errno
+is set appropriately.
+The same errors that occur for
+.BR execve (2)
+can also occur for
+.BR execveat ().
+The following additional errors can occur for
+.BR execveat ():
+.I fd
+is not a valid file descriptor.
+Invalid flag specified in
+.IR flags .
+.I pathname
+is relative and
+.I fd
+is a file descriptor referring to a file other than a directory.
+.BR execveat ()
+was added to Linux in kernel 3.???.
+In addition to the reasons explained in
+.BR openat (2),
+.BR execveat ()
+system call is also needed to allow
+.BR fexecve (3)
+to be implemented on systems that do not have the
+.I /proc
+filesystem mounted.
+.BR execve (2),
+.BR fexecve (3)

 \ /
  Last update: 2014-06-05 16:21    [W:0.110 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site