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 11B843851C2D for ; Tue, 28 Apr 2020 17:25:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 11B843851C2D 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 1jTTys-0003rf-06 for libc-alpha@sourceware.org; Tue, 28 Apr 2020 17:25:14 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jTTyr-0000A5-Te for libc-alpha@sourceware.org; Tue, 28 Apr 2020 19:25:13 +0200 From: Florian Weimer To: libc-alpha@sourceware.org Subject: Re: [PATCH] manual: Document the fexecve function References: <871ro9z2rv.fsf@mid.deneb.enyo.de> Date: Tue, 28 Apr 2020 19:25:13 +0200 In-Reply-To: <871ro9z2rv.fsf@mid.deneb.enyo.de> (Florian Weimer's message of "Mon, 27 Apr 2020 11:39:00 +0200") Message-ID: <877dxzo746.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-21.8 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: Tue, 28 Apr 2020 17:25:16 -0000 * Florian Weimer: > ----- > 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{}}} I pushed this by accident, but Joseph has reviewed the patch here: