[libc-commits] [libc] [libc] Implement execvpe in unistd (PR #234071)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Wed Oct 21 02:34:07 PDT 2026


https://github.com/labath commented:

Don't just copy the implementation. Put the common code into a helper function used by both entrypoints. For example, I do something like that here: https://github.com/llvm/llvm-project/pull/233876

There's also something wrong with the test on two of the bots. I suspect it's not that fork() itself fails, but rather that execvpe call fails for some reason, and then the child code falls through to the `assert(pid>0)` line. Apart from fixing the bug, I'd suggest adding a call to `_exit(libc_errno)` after every execve call, so that the child dies no matter what (and the errno gets surfaced as a result of the status check in the parent).

https://github.com/llvm/llvm-project/pull/234071


More information about the libc-commits mailing list