Skip to content

Commit 7af3d5c

Browse files
authored
Change argv and envp types in execveat declaration
The POSIX API is poorly designed, allowing modifiable parameters that are never actually changed in practice.
1 parent 7c138a6 commit 7af3d5c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • include/fast_io_hosted/process/process

include/fast_io_hosted/process/process/posix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace posix
1010
{
1111
#if defined(__DARWIN_C_LEVEL) || defined(__MSDOS__)
1212
extern int libc_fexecve(int fd, char *const *argv, char *const *envp) noexcept __asm__("_fexecve");
13-
extern int libc_execveat(int dirfd, char const *pathname, char *const *argv, char *const *envp, int flags) noexcept __asm__("_execveat");
13+
extern int libc_execveat(int dirfd, char const *pathname, char const *const *argv, char const *const *envp, int flags) noexcept __asm__("_execveat");
1414
extern int libc_kill(pid_t pid, int sig) noexcept __asm__("_kill");
1515
extern pid_t libc_fork() noexcept __asm__("_fork");
1616
extern pid_t libc_vfork() noexcept __asm__("_vfork");
@@ -20,7 +20,7 @@ extern pid_t libc_waitpid(pid_t pid, int *status, int options) noexcept __asm__(
2020
[[noreturn]] extern void libc_exit2(int status) noexcept __asm__("__exit");
2121
#else
2222
extern int libc_fexecve(int fd, char *const *argv, char *const *envp) noexcept __asm__("fexecve");
23-
extern int libc_execveat(int dirfd, char const *pathname, char *const *argv, char *const *envp, int flags) noexcept __asm__("execveat");
23+
extern int libc_execveat(int dirfd, char const *pathname, char const *const *argv, char const *const *envp, int flags) noexcept __asm__("execveat");
2424
extern int libc_kill(pid_t pid, int sig) noexcept __asm__("kill");
2525
extern pid_t libc_fork() noexcept __asm__("fork");
2626
extern pid_t libc_vfork() noexcept __asm__("vfork");

0 commit comments

Comments
 (0)