diff options
author | Alan Conway <aconway@apache.org> | 2009-03-03 21:07:49 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-03-03 21:07:49 +0000 |
commit | 9edad1c3334513fa32d7c267d20d726d8f7e1468 (patch) | |
tree | 87d1c1c824ba9092ea5502580ea35d71b5b203d7 /cpp/src | |
parent | edeb221a23bb326cd8d058016cceb5a36d74966d (diff) | |
download | qpid-python-9edad1c3334513fa32d7c267d20d726d8f7e1468.tar.gz |
cpp/src/tests/ForkedBroker.cpp: supress misleading exceptions with kill -9.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@749756 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/tests/ForkedBroker.cpp | 4 | ||||
-rw-r--r-- | cpp/src/tests/failover_soak.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/cpp/src/tests/ForkedBroker.cpp b/cpp/src/tests/ForkedBroker.cpp index 2b90068549..f970c384f7 100644 --- a/cpp/src/tests/ForkedBroker.cpp +++ b/cpp/src/tests/ForkedBroker.cpp @@ -41,9 +41,9 @@ void ForkedBroker::kill(int sig) { if (::kill(savePid, sig) < 0) throw ErrnoException("kill failed"); int status; - if (::waitpid(savePid, &status, 0) < 0) + if (::waitpid(savePid, &status, 0) < 0 && sig != 9) throw ErrnoException("wait for forked process failed"); - if (WEXITSTATUS(status) != 0) + if (WEXITSTATUS(status) != 0 && sig != 9) throw qpid::Exception(QPID_MSG("Forked broker exited with: " << WEXITSTATUS(status))); } diff --git a/cpp/src/tests/failover_soak.cpp b/cpp/src/tests/failover_soak.cpp index f8ae2b903d..65c93c8e27 100644 --- a/cpp/src/tests/failover_soak.cpp +++ b/cpp/src/tests/failover_soak.cpp @@ -269,9 +269,8 @@ children allMyChildren; void -childExit ( int signalNumber ) +childExit ( int ) { - signalNumber ++; // Now maybe the compiler willleave me alone? int childReturnCode; pid_t pid = waitpid ( 0, & childReturnCode, WNOHANG); |