21template <
typename Character>
25 Character
const*
const*
const arguments,
26 Character
const*
const*
const environment
37 __crt_errno_guard
const guard_errno;
44 if (initial_result != -1)
45 return initial_result;
54 if (traits::tcschr(
file_name,
'\\') !=
nullptr)
57 if (traits::tcschr(
file_name,
'/') !=
nullptr)
66 Character
const path_name[] = {
'P',
'A',
'T',
'H',
'\0' };
67 __crt_unique_heap_ptr<Character> path_value;
75 __crt_unique_heap_ptr<Character>
const owned_file_buffer(_calloc_crt_t(Character,
_MAX_PATH));
76 if (!owned_file_buffer)
80 Character* path_state = path_value.get();
88 if (last_character_it != traits::tcsrchr(
file_buffer,
'\\') &&
89 last_character_it != traits::tcsrchr(
file_buffer,
'/'))
91 Character
const backslash_string[] = {
'\\',
'\0' };
120 bool const is_unc_path_with_slashes =
124 bool const is_unc_path_with_backslashes =
128 if (is_unc_path_with_slashes || is_unc_path_with_backslashes)
142 char const*
const*
const arguments
150 char const*
const*
const arguments,
151 char const*
const*
const environment
160 char const*
const*
const arguments
169 char const*
const*
const arguments,
170 char const*
const*
const environment
180 wchar_t const*
const*
const arguments
188 wchar_t const*
const*
const arguments,
189 wchar_t const*
const*
const environment
198 wchar_t const*
const*
const arguments
207 wchar_t const*
const*
const arguments,
208 wchar_t const*
const*
const environment
#define _ERRCHECK_EINVAL(e)
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
static char * path_name(DOS_FILE *file)
static char * file_buffer
intptr_t __cdecl _wexecvpe(wchar_t const *const file_name, wchar_t const *const *const arguments, wchar_t const *const *const environment)
intptr_t __cdecl _execvpe(char const *const file_name, char const *const *const arguments, char const *const *const environment)
intptr_t __cdecl _wexecvp(wchar_t const *const file_name, wchar_t const *const *const arguments)
static intptr_t __cdecl common_spawnvp(int const mode, Character const *const file_name, Character const *const *const arguments, Character const *const *const environment)
intptr_t __cdecl _spawnvp(int const mode, char const *const file_name, char const *const *const arguments)
intptr_t __cdecl _spawnvpe(int const mode, char const *const file_name, char const *const *const arguments, char const *const *const environment)
intptr_t __cdecl _wspawnvp(int const mode, wchar_t const *const file_name, wchar_t const *const *const arguments)
intptr_t __cdecl _wspawnvpe(int const mode, wchar_t const *const file_name, wchar_t const *const *const arguments, wchar_t const *const *const environment)
intptr_t __cdecl _execvp(char const *const file_name, char const *const *const arguments)