From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 1E29B3892027 for ; Mon, 27 Apr 2020 09:39:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1E29B3892027 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jT0E8-0005UK-WA for libc-alpha@sourceware.org; Mon, 27 Apr 2020 09:39:00 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jT0E8-0000KR-Sb for libc-alpha@sourceware.org; Mon, 27 Apr 2020 11:39:00 +0200 From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] manual: Document the fexecve function Date: Mon, 27 Apr 2020 11:39:00 +0200 Message-ID: <871ro9z2rv.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-21.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2020 09:39:03 -0000 ----- 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{}}}