View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002003 | 1003.1(2024)/Issue8 | System Interfaces | public | 2026-10-29 06:18 | 2026-10-29 06:55 |
| Reporter | trevor.gross | Assigned To | |||
| Priority | normal | Severity | Comment | Type | Enhancement Request |
| Status | New | Resolution | Open | ||
| Name | Trevor Gross | ||||
| Organization | |||||
| User Reference | |||||
| Section | https://pubs.opengroup.org/onlinepubs/9799919799/functions/exec.html | ||||
| Page Number | https://pubs.opengroup.org/onlinepubs/9799919799/functions/exec.html | ||||
| Line Number | https://pubs.opengroup.org/onlinepubs/9799919799/functions/exec.html | ||||
| Interp Status | |||||
| Final Accepted Text | |||||
| Summary | 0002003: Add execvpe() | ||||
| Description | There is currently no standard way to exec a process with path lookup, a MT-safe custom environment, and an arbitrary argument count. There are two close options: 1. Use execvp(), setting the parent's environment before calling and restoring upon failure. This may create races if other threads are running. 2. Use execle(). Use of variable arguments makes difficult for an unknown argument count. | ||||
| Desired Action | Standardize execvpe(), providing the characteristics of execve() with a path lookup: int execvpe(const char *file, char *const argv[], char *const envp[]); This already exists on some platforms: 1. Linux: https://linux.die.net/man/3/execvpe 2. Solaris: https://docs.oracle.com/cd/E88353_01/html/E37841/execvpe-2.html 3. QNX: https://www.qnx.com/developers/docs/8.0/com.qnx.doc.neutrino.lib_ref/topic/e/execvpe.html | ||||
| Tags | issue9 | ||||
|
|
Alternative: introduce one or both of the following, allowing use of execve(). /* Look up a name in path, consistent with what is done in other libc * functions. */ size_t posix_which(const char *file, char *buf, size_t len); /* Retrieve the path that should be used for lookups. Typically this is * getenv("PATH") if available, with a fallback to confstr(_CS_PATH). * * May point to environ, a static, or an initialized-once cache. Does * not need to be freed. */ const char *posix_getpath(); |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-10-29 06:18 | trevor.gross | New Issue | |
| 2026-10-29 06:18 | trevor.gross | Tag Attached: issue9 | |
| 2026-10-29 06:55 | trevor.gross | Note Added: 0007535 |