Improve execve() path argument munging

Munging of paths passed inside the system() interpreter command is no
longer supported. You have to pass your paths to posix_spawn() or the
execve() family of functions if you want them to be munged. The first
three characters must match `^/[a-z]/` in which case, it'll be turned
into a DOS-style drive path with backslashes.
This commit is contained in:
Justine Tunney 2023-11-17 09:54:11 -08:00
parent 529cb4817c
commit 32b97f2d25
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
5 changed files with 88 additions and 78 deletions

View file

@ -5,6 +5,7 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
void mungentpath(char *);
int mkntcmdline(char16_t[32767], char *const[]);
int mkntenvblock(char16_t[32767], char *const[], char *const[], char[32767]);
int ntspawn(int64_t, const char *, char *const[], char *const[], char *const[],