Module: wine Branch: master Commit: e20ef5013992e8b6671a238aabe3c962a589c51b URL: http://source.winehq.org/git/wine.git/?a=commit;h=e20ef5013992e8b6671a238aab...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Oct 7 15:36:44 2008 +0200
msvcrt: Pass the command interpreter as exe name from _wpopen.
---
dlls/msvcrt/process.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index 9dbc43e..5298520 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);