Commit e20ef501 authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Pass the command interpreter as exe name from _wpopen.

parent 3a2dda11
......@@ -1125,9 +1125,8 @@ MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wc
strcpyW(fullcmd, comspec);
strcatW(fullcmd, flag);
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]);
ret = NULL;
......@@ -1138,6 +1137,7 @@ MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wc
if (!ret)
MSVCRT__close(fds[fdToOpen]);
}
HeapFree(GetProcessHeap(), 0, comspec);
HeapFree(GetProcessHeap(), 0, fullcmd);
MSVCRT__dup2(fdStdHandle, fdToDup);
MSVCRT__close(fdStdHandle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment