msvcrt: Pass the command interpreter as exe name from _wpopen.
This commit is contained in:
parent
3a2dda11e9
commit
e20ef50139
|
@ -1125,9 +1125,8 @@ MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wc
|
||||||
strcpyW(fullcmd, comspec);
|
strcpyW(fullcmd, comspec);
|
||||||
strcatW(fullcmd, flag);
|
strcatW(fullcmd, flag);
|
||||||
strcatW(fullcmd, command);
|
strcatW(fullcmd, command);
|
||||||
HeapFree(GetProcessHeap(), 0, comspec);
|
|
||||||
|
|
||||||
if (msvcrt_spawn(MSVCRT__P_NOWAIT, NULL, fullcmd, NULL, 1) == -1)
|
if (msvcrt_spawn(MSVCRT__P_NOWAIT, comspec, fullcmd, NULL, 1) == -1)
|
||||||
{
|
{
|
||||||
MSVCRT__close(fds[fdToOpen]);
|
MSVCRT__close(fds[fdToOpen]);
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
|
@ -1138,6 +1137,7 @@ MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wc
|
||||||
if (!ret)
|
if (!ret)
|
||||||
MSVCRT__close(fds[fdToOpen]);
|
MSVCRT__close(fds[fdToOpen]);
|
||||||
}
|
}
|
||||||
|
HeapFree(GetProcessHeap(), 0, comspec);
|
||||||
HeapFree(GetProcessHeap(), 0, fullcmd);
|
HeapFree(GetProcessHeap(), 0, fullcmd);
|
||||||
MSVCRT__dup2(fdStdHandle, fdToDup);
|
MSVCRT__dup2(fdStdHandle, fdToDup);
|
||||||
MSVCRT__close(fdStdHandle);
|
MSVCRT__close(fdStdHandle);
|
||||||
|
|
Loading…
Reference in New Issue