Skip to content

fix path-searching for execvp

B K requested to merge bkurtz/gcompat:fix-execvp into current

The POSIX definition (e.g. here) for execvp says:

If the path argument does not contain a slash, the directories specified by the PATH environment variable are searched in an attempt to locate the file.

The current implementation of execvp in gcompat makes no attempt to search the PATH and instead just executes the argument directly.

The proposed fix uses custom code in the specific case that gcompat is trying to patch and otherwise shells out to the existing execvp.

Merge request reports