Add additional printouts

Fix formatting
parent 0e7e96fc
...@@ -289,25 +289,28 @@ int main(int argc, const char** argv ) ...@@ -289,25 +289,28 @@ int main(int argc, const char** argv )
if (TerminateJobObject(job_handle, 201) == 0) if (TerminateJobObject(job_handle, 201) == 0)
message("TerminateJobObject failed"); message("TerminateJobObject failed");
CloseHandle(job_handle); CloseHandle(job_handle);
message("Job terminated and closed");
if (wait_res != WAIT_OBJECT_0 + CHILD) if (wait_res != WAIT_OBJECT_0 + CHILD)
{ {
/* The child has not yet returned, wait for it */ /* The child has not yet returned, wait for it */
message("waiting for child to exit"); message("waiting for child to exit");
if ((wait_res= WaitForSingleObject(wait_handles[CHILD], INFINITE)) != WAIT_OBJECT_0) if ((wait_res= WaitForSingleObject(wait_handles[CHILD], INFINITE))
{ != WAIT_OBJECT_0)
{
message("child wait failed: %d", wait_res); message("child wait failed: %d", wait_res);
} }
else else
{ {
message("child wait succeeded"); message("child wait succeeded");
} }
/* Child's exit code should now be 201, no need to get it */ /* Child's exit code should now be 201, no need to get it */
} }
message("Closing handles");
for (int i= 0; i < NUM_HANDLES; i++) for (int i= 0; i < NUM_HANDLES; i++)
CloseHandle(wait_handles[i]); CloseHandle(wait_handles[i]);
message("Exiting, exit_code: %d", child_exit_code);
exit(child_exit_code); exit(child_exit_code);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment