|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r48780 - trunk/boost/test/impl
From: gennadiy.rozental_at_[hidden]
Date: 2008-09-14 20:58:41
Author: rogeeff
Date: 2008-09-14 20:58:40 EDT (Sun, 14 Sep 2008)
New Revision: 48780
URL: http://svn.boost.org/trac/boost/changeset/48780
Log:
introduced compile time switch BOOST_TEST_IGNORE_NON_ZERO_CHILD_CODE (undef by default) to be used to ignore non zero return code from child processes
Text files modified:
trunk/boost/test/impl/execution_monitor.ipp | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
Modified: trunk/boost/test/impl/execution_monitor.ipp
==============================================================================
--- trunk/boost/test/impl/execution_monitor.ipp (original)
+++ trunk/boost/test/impl/execution_monitor.ipp 2008-09-14 20:58:40 EDT (Sun, 14 Sep 2008)
@@ -693,9 +693,21 @@
extern "C" {
+static bool ignore_sigchild( siginfo_t* info )
+{
+ return info->si_signo == SIGCHLD && info->si_code == CLD_EXITED
+#ifdef BOOST_TEST_IGNORE_NON_ZERO_CHILD_CODE
+ ;
+#else
+ && (int)info->si_status == 0;
+#endif
+}
+
+//____________________________________________________________________________//
+
static void execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context )
{
- if( info->si_signo == SIGCHLD && info->si_code == CLD_EXITED && (int)info->si_status == 0 )
+ if( ignore_sigchild( info ) )
return;
signal_handler::sys_sig()( info, context );
@@ -707,11 +719,11 @@
static void execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context )
{
- if( info->si_signo == SIGCHLD && info->si_code == CLD_EXITED && (int)info->si_status == 0 )
+ if( ignore_sigchild( info ) )
return;
if( !debug::attach_debugger( false ) )
- execution_monitor_jumping_signal_handler( sig, info, context );
+ execution_monitor_jumping_signal_handler( sig, info, context );
// debugger attached; it will handle the signal
BOOST_TEST_SYS_ASSERT( ::signal( sig, SIG_DFL ) != SIG_ERR );
@@ -1024,7 +1036,7 @@
__try {
__try {
- ret_val = detail::do_invoke( m_custom_translators , F );
+ ret_val = detail::do_invoke( m_custom_translators, F );
}
__except( SSE( GetExceptionCode(), GetExceptionInformation() ) ) {
throw SSE;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk