LibC: Implement execvpe

This is not part of posix but it seems handy
This commit is contained in:
Bananymous 2025-11-09 16:12:29 +02:00
parent b755cf3e42
commit 4b36e5197d
2 changed files with 6 additions and 0 deletions

View File

@ -530,6 +530,7 @@ int execlp(const char* file, const char* arg0, ...);
int execv(const char* path, char* const argv[]);
int execve(const char* path, char* const argv[], char* const envp[]);
int execvp(const char* file, char* const argv[]);
int execvpe(const char* file, char* const argv[], char* const envp[]);
int faccessat(int fd, const char* path, int amode, int flag);
int fchdir(int fildes);
int fchown(int fildes, uid_t owner, gid_t group);

View File

@ -431,6 +431,11 @@ int execvp(const char* pathname, char* const argv[])
return exec_impl(pathname, argv, environ, true);
}
int execvpe(const char* pathname, char* const argv[], char* const envp[])
{
return exec_impl(pathname, argv, envp, true);
}
pid_t fork(void)
{
_pthread_call_atfork(_PTHREAD_ATFORK_PREPARE);