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/tests/ForkedBroker.cpp | |
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/tests/ForkedBroker.cpp')
-rw-r--r-- | cpp/src/tests/ForkedBroker.cpp | 4 |
1 files changed, 2 insertions, 2 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))); } |