boost/boost-sigcld_handling.patch

73 lines
3.7 KiB
Diff

--- boost/test/impl/execution_monitor.ipp
+++ boost/test/impl/execution_monitor.ipp 2008/10/29 12:36:46
@@ -401,40 +401,43 @@
}
break;
+#if defined(BOOST_TEST_CATCH_SIGCHLD)
+
case SIGCHLD:
switch( m_sig_info->si_code ) {
case CLD_EXITED:
report_error( execution_exception::system_error,
"child has exited; pid: %d; uid: %d; exit value: %d",
- (int)m_sig_info->si_uid, (int)m_sig_info->si_pid, (int)m_sig_info->si_status );
+ (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
break;
case CLD_KILLED:
report_error( execution_exception::system_error,
"child was killed; pid: %d; uid: %d; exit value: %d",
- (int)m_sig_info->si_uid, (int)m_sig_info->si_pid, (int)m_sig_info->si_status );
+ (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
break;
case CLD_DUMPED:
report_error( execution_exception::system_error,
"child terminated abnormally; pid: %d; uid: %d; exit value: %d",
- (int)m_sig_info->si_uid, (int)m_sig_info->si_pid, (int)m_sig_info->si_status );
+ (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
break;
case CLD_TRAPPED:
report_error( execution_exception::system_error,
"traced child has trapped; pid: %d; uid: %d; exit value: %d",
- (int)m_sig_info->si_uid, (int)m_sig_info->si_pid, (int)m_sig_info->si_status );
+ (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
break;
case CLD_STOPPED:
report_error( execution_exception::system_error,
"child has stopped; pid: %d; uid: %d; exit value: %d",
- (int)m_sig_info->si_uid, (int)m_sig_info->si_pid, (int)m_sig_info->si_status );
+ (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
break;
case CLD_CONTINUED:
report_error( execution_exception::system_error,
"stopped child had continued; pid: %d; uid: %d; exit value: %d",
- (int)m_sig_info->si_uid, (int)m_sig_info->si_pid, (int)m_sig_info->si_status );
+ (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
break;
}
break;
+#endif
#if defined(BOOST_TEST_CATCH_SIGPOLL)
@@ -595,7 +598,9 @@
signal_action m_FPE_action;
signal_action m_SEGV_action;
signal_action m_BUS_action;
+#ifdef BOOST_TEST_CATCH_SIGCHLD
signal_action m_CHLD_action;
+#endif
#ifdef BOOST_TEST_CATCH_SIGPOLL
signal_action m_POLL_action;
#endif
@@ -621,7 +626,9 @@
, m_FPE_action ( SIGFPE , catch_system_errors, attach_dbg, alt_stack )
, m_SEGV_action( SIGSEGV, catch_system_errors, attach_dbg, alt_stack )
, m_BUS_action ( SIGBUS , catch_system_errors, attach_dbg, alt_stack )
+#ifdef BOOST_TEST_CATCH_SIGCHLD
, m_CHLD_action( SIGCHLD, catch_system_errors, attach_dbg, alt_stack )
+#endif
#ifdef BOOST_TEST_CATCH_SIGPOLL
, m_POLL_action( SIGPOLL, catch_system_errors, attach_dbg, alt_stack )
#endif