cosmopolitan/libc/proc/ntspawn.h
Justine Tunney 32b97f2d25
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.
2023-11-17 09:59:03 -08:00

17 lines
694 B
C

#ifndef COSMOPOLITAN_NTSPAWN_H_
#define COSMOPOLITAN_NTSPAWN_H_
#include "libc/nt/struct/processinformation.h"
#include "libc/nt/struct/startupinfo.h"
#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[],
uint32_t, const char16_t *, int64_t, int64_t *, uint32_t,
const struct NtStartupInfo *, struct NtProcessInformation *);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_NTSPAWN_H_ */