[v5,14/35] execveat.2: Use syscall(SYS_...); for system calls without a wrapper

Message ID 20210404115847.78166-15-alx.manpages@gmail.com
State New
Headers show
Series
  • Untitled series #36397
Related show

Commit Message

Wilco Dijkstra via Libc-alpha April 4, 2021, 11:58 a.m.
Add <linux/fcntl.h>, which contains AT_* definitions used by
execveat().

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

---
 man2/execveat.2 | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

-- 
2.31.0

Comments

Wilco Dijkstra via Libc-alpha April 5, 2021, 11:33 a.m. | #1
Hi Alex,

On 4/4/21 1:58 PM, Alejandro Colomar wrote:
> Add <linux/fcntl.h>, which contains AT_* definitions used by

> execveat().

> 

> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>


Patch applied.

Thanks,

Michael


> ---

>  man2/execveat.2 | 14 +++++---------

>  1 file changed, 5 insertions(+), 9 deletions(-)

> 

> diff --git a/man2/execveat.2 b/man2/execveat.2

> index 855832765..c566f53df 100644

> --- a/man2/execveat.2

> +++ b/man2/execveat.2

> @@ -28,15 +28,14 @@

>  execveat \- execute program relative to a directory file descriptor

>  .SH SYNOPSIS

>  .nf

> +.BR "#include <linux/fcntl.h>" "      /* Definition of " AT_* " constants */"

> +.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"

>  .B #include <unistd.h>

>  .PP

> -.BI "int execveat(int " dirfd ", const char *" pathname ,

> -.BI "             const char *const " argv "[], const char *const " envp [],

> -.BI "             int " flags );

> +.BI "int syscall(SYS_execveat, int " dirfd ", const char *" pathname ,

> +.BI "            const char *const " argv "[], const char *const " envp [],

> +.BI "            int " flags );

>  .fi

> -.PP

> -.IR Note :

> -There is no glibc wrapper for this system call; see NOTES.

>  .\" FIXME . See https://sourceware.org/bugzilla/show_bug.cgi?id=27364

>  .SH DESCRIPTION

>  .\" commit 51f39a1f0cea1cacf8c787f652f26dfee9611874

> @@ -209,9 +208,6 @@ the natural idiom when using

>  is to set the close-on-exec flag on

>  .IR dirfd .

>  (But see BUGS.)

> -.PP

> -Glibc does not provide a wrapper for this system call; call it using

> -.BR syscall (2).

>  .SH BUGS

>  The

>  .B ENOENT

> 



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Patch

diff --git a/man2/execveat.2 b/man2/execveat.2
index 855832765..c566f53df 100644
--- a/man2/execveat.2
+++ b/man2/execveat.2
@@ -28,15 +28,14 @@ 
 execveat \- execute program relative to a directory file descriptor
 .SH SYNOPSIS
 .nf
+.BR "#include <linux/fcntl.h>" "      /* Definition of " AT_* " constants */"
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
 .B #include <unistd.h>
 .PP
-.BI "int execveat(int " dirfd ", const char *" pathname ,
-.BI "             const char *const " argv "[], const char *const " envp [],
-.BI "             int " flags );
+.BI "int syscall(SYS_execveat, int " dirfd ", const char *" pathname ,
+.BI "            const char *const " argv "[], const char *const " envp [],
+.BI "            int " flags );
 .fi
-.PP
-.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
 .\" FIXME . See https://sourceware.org/bugzilla/show_bug.cgi?id=27364
 .SH DESCRIPTION
 .\" commit 51f39a1f0cea1cacf8c787f652f26dfee9611874
@@ -209,9 +208,6 @@  the natural idiom when using
 is to set the close-on-exec flag on
 .IR dirfd .
 (But see BUGS.)
-.PP
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
 .SH BUGS
 The
 .B ENOENT