diff options
-rw-r--r-- | ltcf-cxx.sh | 3 | ||||
-rw-r--r-- | tests/Pipe_Test.cpp | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/ltcf-cxx.sh b/ltcf-cxx.sh index d3dd7c67654..7d8a5c35f0e 100644 --- a/ltcf-cxx.sh +++ b/ltcf-cxx.sh @@ -505,6 +505,9 @@ if eval $ac_compile 2>&5; then *) ;; # Ignore the rest. esac done + + # Clean up. + rm -f a.out else echo "ltcf-cxx.sh: error: problem compiling test program" fi diff --git a/tests/Pipe_Test.cpp b/tests/Pipe_Test.cpp index 8d4f1d9717e..c0ead1a0ce5 100644 --- a/tests/Pipe_Test.cpp +++ b/tests/Pipe_Test.cpp @@ -119,6 +119,8 @@ main (int argc, ASYS_TCHAR *argv[]) else options.command_line (ACE_TEXT ("Pipe_Test") ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (" -c")); + ACE_exitcode status = 0; + for (int i = 0; i < ::iterations; i++) { ACE_Process server; @@ -129,7 +131,23 @@ main (int argc, ASYS_TCHAR *argv[]) server.getpid ())); // Wait for the process we just created to exit. - server.wait (); + server.wait (&status); + + // Check if child exited without error. + if (WIFEXITED (status) != 0 + && WEXITSTATUS (status) != 0) + { + ACE_DEBUG ((LM_DEBUG, + "Child of server %d finished with error " + "exit status %d\n", + server.getpid (), + WEXITSTATUS (status))); + + ACE_END_TEST; + + exit (WEXITSTATUS (status)); + } + ACE_DEBUG ((LM_DEBUG, "Server %d finished\n", server.getpid ())); } ACE_END_TEST; |