int impl::check_result::termsig(void) const { PRE(signaled()); return atf_check_result_termsig(&m_result); }
int impl::status::termsig(void) const { assert(signaled()); int mutable_status = m_status; return WTERMSIG(mutable_status); }
bool impl::status::coredump(void) const { assert(signaled()); int mutable_status = m_status; return WCOREDUMP(mutable_status); }
inline bool posix_status::dumped_core(void) const { BOOST_ASSERT(signaled()); return WCOREDUMP(m_flags); }
inline int posix_status::term_signal(void) const { BOOST_ASSERT(signaled()); return WTERMSIG(m_flags); }
//------------------------------------------------------------------------------ // Name: reason() const // Desc: what was the reason for this event //------------------------------------------------------------------------------ DebugEvent::REASON DebugEvent::reason() const { // this basically converts our value into a 'switchable' value for convenience if(stopped()) { return EVENT_STOPPED; } else if(signaled()) { return EVENT_SIGNALED; } else if(exited()) { return EVENT_EXITED; } else { return EVENT_UNKNOWN; } }
const char *tst_strstatus(int status) { if (WIFEXITED(status)) return exited(status); if (WIFSIGNALED(status)) return signaled(status); if (WIFSTOPPED(status)) return "is stopped"; if (WIFCONTINUED(status)) return "is resumed"; return invalid(status); }
/** * If signaled, returns whether the process dumped core. * * If the process was signaled, returns whether the process * produced a core dump. * * \pre signaled() is true. */ bool dumped_core() const { BOOST_ASSERT(signaled()); return WCOREDUMP(flags_); }
/** * If signaled, returns the terminating signal code. * * If the process was signaled, returns the terminating signal code. * * \pre signaled() is true. */ int term_signal() const { BOOST_ASSERT(signaled()); return WTERMSIG(flags_); }