Bug 10221 - Please provide execvpe as a GNU extension
Summary: Please provide execvpe as a GNU extension
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
Depends on:
Reported: 2009-05-30 19:49 UTC by Martin Buchholz
Modified: 2014-07-01 20:15 UTC (History)
1 user (show)

See Also:
Last reconfirmed:
fweimer: security-


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Buchholz 2009-05-30 19:49:11 UTC
The Unix standards do not provide an execvpe,
which is obvious "missing" functionality.
Java's subprocess implementation is one example of
software projects implementing their own execvpe.
For glibc, the implementation seems particularly easy
- copy posix/execvp.c to posix/execvpe.c, replacing references to 
__environ with a reference to a user-provided envp.

It is hard for users to implement execvpe completely faithfully themselves,
because it is not so easy to find the default value of PATH,
or the right shell to use to run scripts in case of ENOEXEC,
in accordance with the standard practice on the platform.

If agreed, I would be willing to help work on implementation,
although I am not a glibc hacker.

Hopefully, execvpe would be added to a future revision of the Unix standards.
Comment 1 Ulrich Drepper 2009-06-02 14:04:24 UTC
Add in git master.