Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-02-07 12:57:43 +0300
committerCorinna Vinschen <corinna@vinschen.de>2006-02-07 12:57:43 +0300
commit3cb155a97f98f2f7e9e68b6c536b9bb3777e33d8 (patch)
treeadca82de001a62e43b4fbdd791fcf1c71d7f2259
parent3d1172c133fd09fb24058e57ea6dbe9409671817 (diff)
* init.cc (respawn_wow64_process): Exit with the exit code returned
by the respawned process.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/init.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index fe83089da..f5c38fdd6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
Always zero all elements of siginfo_t throughout.
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 0f1827a63..5a4d5690b 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -122,6 +122,8 @@ respawn_wow64_process ()
{
PROCESS_INFORMATION pi;
STARTUPINFO si;
+ DWORD ret = 0;
+
GetStartupInfo (&si);
if (!CreateProcessA (NULL, GetCommandLineA (), NULL, NULL, TRUE,
CREATE_DEFAULT_ERROR_MODE
@@ -131,8 +133,9 @@ respawn_wow64_process ()
CloseHandle (pi.hThread);
if (WaitForSingleObject (pi.hProcess, INFINITE) == WAIT_FAILED)
api_fatal ("Waiting for process %d failed, %E", pi.dwProcessId);
+ GetExitCodeProcess (pi.hProcess, &ret);
CloseHandle (pi.hProcess);
- ExitProcess (0);
+ ExitProcess (ret);
}
}