From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 5F04E3986032; Mon, 27 Apr 2020 10:44:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F04E3986032 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] manual: Document the fexecve function X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/master X-Git-Oldrev: b3cae39dcbfa2432b3f3aa28854d8ac57f0de1b8 X-Git-Newrev: 6771af1123d55e08450ccf4553dd0d674b7f099b Message-Id: <20200427104443.5F04E3986032@sourceware.org> Date: Mon, 27 Apr 2020 10:44:43 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2020 10:44:43 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6771af1123d55e08450ccf4553dd0d674b7f099b commit 6771af1123d55e08450ccf4553dd0d674b7f099b Author: Florian Weimer Date: Mon Apr 27 11:38:28 2020 +0200 manual: Document the fexecve function Diff: --- manual/process.texi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/manual/process.texi b/manual/process.texi index 5728bde2cb..b20ad26cbf 100644 --- a/manual/process.texi +++ b/manual/process.texi @@ -405,6 +405,19 @@ be an array of strings in the same format as for the @code{environ} variable; see @ref{Environment Access}. @end deftypefun +@deftypefun int fexecve (int @var{fd}, char *const @var{argv}@t{[]}, char *const @var{env}@t{[]}) +@standards{POSIX.1, unistd.h} +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} +This is similar to @code{execve}, but instead identifying the progam +executable by its pathname, the file descriptor @var{fd} is used. The +descriptor must have been opened with the @code{O_RDONLY} flag or (on +Linux) the @code{O_PATH} flag. + +On Linux, @code{fexecve} can fail with an error of @code{ENOSYS} if +@file{/proc} has not been mounted and the kernel lacks support for the +underlying @code{execveat} system call. +@end deftypefun + @deftypefun int execle (const char *@var{filename}, const char *@var{arg0}, @dots{}, char *const @var{env}@t{[]}) @standards{POSIX.1, unistd.h} @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}