added terminate process
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@922 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
74875edfc5
commit
0dcf9ff3c4
1 changed files with 4 additions and 2 deletions
|
@ -81,7 +81,7 @@ void ExecScript(BOOL log) {
|
||||||
OSVERSIONINFO osv={sizeof(osv)};
|
OSVERSIONINFO osv={sizeof(osv)};
|
||||||
HANDLE newstdout=0,read_stdout=0;
|
HANDLE newstdout=0,read_stdout=0;
|
||||||
DWORD dwRead = 1;
|
DWORD dwRead = 1;
|
||||||
DWORD dwExit = !STILL_ACTIVE;
|
DWORD dwExit;
|
||||||
HGLOBAL memory;
|
HGLOBAL memory;
|
||||||
char *szBuf;
|
char *szBuf;
|
||||||
GetVersionEx(&osv);
|
GetVersionEx(&osv);
|
||||||
|
@ -106,7 +106,9 @@ void ExecScript(BOOL log) {
|
||||||
CloseHandle(read_stdout);
|
CloseHandle(read_stdout);
|
||||||
pushstring("error");
|
pushstring("error");
|
||||||
}
|
}
|
||||||
WaitForSingleObject(pi.hProcess,INFINITE);
|
if (WaitForSingleObject(pi.hProcess,INFINITE)==WAIT_TIMEOUT) {
|
||||||
|
TerminateProcess(pi.hProcess,GetExitCodeProcess(pi.hProcess,&dwExit));
|
||||||
|
}
|
||||||
PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
|
PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
|
||||||
memory = GlobalAlloc(GMEM_MOVEABLE,dwRead+1);
|
memory = GlobalAlloc(GMEM_MOVEABLE,dwRead+1);
|
||||||
szBuf = (char *)GlobalLock(memory);
|
szBuf = (char *)GlobalLock(memory);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue