| Issue |
234065
|
| Summary |
[libc] Implement execvpe in unistd
|
| Labels |
libc
|
| Assignees |
|
| Reporter |
amanmaurya92
|
### Summary
Implement the standard POSIX.1-2024 function `execvpe` in `<unistd.h>`.
POSIX specification: https://pubs.opengroup.org/onlinepubs/9799919799/functions/execvpe.html
### Background & Context
The `exec` family replaces the current process image with a new process image. `execvpe` combines the PATH-searching behavior of `execvp` with an explicit environment array (`envp`), rather than falling back to the global `environ`:
```c
int execvpe(const char *file, char *const argv[], char *const envp[]);
```
`execvp` has already been implemented in `libc/src/unistd/linux/execvp.cpp`, providing the PATH resolution logic and `execve` invocation infrastructure. `execvpe` is a natural addition that provides the standard POSIX.1-2024 interface.
### Scope
- Implement `execvpe` in `libc/src/unistd/` and `libc/src/unistd/linux/` (reusing existing PATH resolution logic from `execvp`).
- Add declaration in `libc/include/unistd.yaml`.
- Register entrypoint across supported Linux architectures in `entrypoints.txt`.
- Add unit and integration tests under `libc/test/src/unistd/`.
I would like to work on this issue.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs