File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ static void __cdecl InputHandlerThread(LPVOID);
48
48
49
49
int main (int argc , const char * argv []) {
50
50
Context ctx ;
51
+ uint32_t childExitCode = 0 ;
51
52
52
53
ParseArgs (argc , argv , & ctx );
53
54
@@ -87,6 +88,8 @@ int main(int argc, const char* argv[]) {
87
88
88
89
WaitForMultipleObjects (sizeof (ctx .events ) / sizeof (HANDLE ), ctx .events , FALSE,
89
90
INFINITE );
91
+
92
+ GetExitCodeProcess (cmdProc .hProcess , & childExitCode );
90
93
}
91
94
92
95
CloseHandle (cmdProc .hThread );
@@ -107,7 +110,7 @@ int main(int argc, const char* argv[]) {
107
110
108
111
CloseHandle (ctx .events [0 ]);
109
112
}
110
- return S_OK == hr ? EXIT_SUCCESS : EXIT_FAILURE ;
113
+ return S_OK == hr ? childExitCode : EXIT_FAILURE ;
111
114
}
112
115
113
116
static void ParseArgs (int argc , const char * argv [], Context * ctx ) {
You can’t perform that action at this time.
0 commit comments