* init.cc (respawn_wow64_process): Exit with the exit code returned
by the respawned process.
This commit is contained in:
parent
3d1172c133
commit
3cb155a97f
|
@ -1,3 +1,8 @@
|
||||||
|
2006-02-07 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* init.cc (respawn_wow64_process): Exit with the exit code returned
|
||||||
|
by the respawned process.
|
||||||
|
|
||||||
2006-02-06 Christopher Faylor <cgf@timesys.com>
|
2006-02-06 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
Always zero all elements of siginfo_t throughout.
|
Always zero all elements of siginfo_t throughout.
|
||||||
|
|
|
@ -122,6 +122,8 @@ respawn_wow64_process ()
|
||||||
{
|
{
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
|
DWORD ret = 0;
|
||||||
|
|
||||||
GetStartupInfo (&si);
|
GetStartupInfo (&si);
|
||||||
if (!CreateProcessA (NULL, GetCommandLineA (), NULL, NULL, TRUE,
|
if (!CreateProcessA (NULL, GetCommandLineA (), NULL, NULL, TRUE,
|
||||||
CREATE_DEFAULT_ERROR_MODE
|
CREATE_DEFAULT_ERROR_MODE
|
||||||
|
@ -131,8 +133,9 @@ respawn_wow64_process ()
|
||||||
CloseHandle (pi.hThread);
|
CloseHandle (pi.hThread);
|
||||||
if (WaitForSingleObject (pi.hProcess, INFINITE) == WAIT_FAILED)
|
if (WaitForSingleObject (pi.hProcess, INFINITE) == WAIT_FAILED)
|
||||||
api_fatal ("Waiting for process %d failed, %E", pi.dwProcessId);
|
api_fatal ("Waiting for process %d failed, %E", pi.dwProcessId);
|
||||||
|
GetExitCodeProcess (pi.hProcess, &ret);
|
||||||
CloseHandle (pi.hProcess);
|
CloseHandle (pi.hProcess);
|
||||||
ExitProcess (0);
|
ExitProcess (ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue