Skip to content

Commit aa065c6

Browse files
committed
Auto merge of #3372 - SteveLauC:execveat, r=JohnTitor
add execveat for glibc Addd [`execveat(2)`](https://man7.org/linux/man-pages/man2/execveat.2.html) for glibc ``` #include <linux/fcntl.h> /* Definition of AT_* constants */ #include <unistd.h> int execveat(int dirfd, const char *pathname, char *const _Nullable argv[], char *const _Nullable envp[], int flags); ``` This wrapper is not available on: 1. musl 2. uClibc 3. bionic (Android)
2 parents 6e02a32 + d3910f6 commit aa065c6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,3 +664,4 @@ gnu_basename
664664
getmntent_r
665665
putpwent
666666
putgrent
667+
execveat

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,14 @@ extern "C" {
13911391
buf: *mut ::c_char,
13921392
buflen: ::c_int,
13931393
) -> *mut ::mntent;
1394+
1395+
pub fn execveat(
1396+
dirfd: ::c_int,
1397+
pathname: *const ::c_char,
1398+
argv: *const *mut c_char,
1399+
envp: *const *mut c_char,
1400+
flags: ::c_int,
1401+
) -> ::c_int;
13941402
}
13951403

13961404
cfg_if! {

0 commit comments

Comments
 (0)