From 9edad1c3334513fa32d7c267d20d726d8f7e1468 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 3 Mar 2009 21:07:49 +0000 Subject: 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 --- cpp/src/tests/ForkedBroker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/src/tests/ForkedBroker.cpp') 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))); } -- cgit v1.2.1