From e20ef5013992e8b6671a238aabe3c962a589c51b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 7 Oct 2008 15:36:44 +0200 Subject: [PATCH] msvcrt: Pass the command interpreter as exe name from _wpopen. --- dlls/msvcrt/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index 9dbc43edb3..5298520e74 100644 --- a/dlls/msvcrt/process.c +++ b/dlls/msvcrt/process.c @@ -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); -- 2.32.0.93.g670b81a890