00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00018 #ifndef BOOST_PROCESS_POSIX_STATUS_HPP
00019 #define BOOST_PROCESS_POSIX_STATUS_HPP
00020
00021 #include <boost/process/config.hpp>
00022
00023 #if defined(BOOST_POSIX_API)
00024 # include <sys/wait.h>
00025 #elif defined(BOOST_WINDOWS_API)
00026 #else
00027 # error "Unsupported platform."
00028 #endif
00029
00030 #include <boost/process/status.hpp>
00031 #include <boost/assert.hpp>
00032
00033 namespace boost {
00034 namespace process {
00035
00043 class posix_status : public status
00044 {
00045 public:
00054 posix_status(const status &s)
00055 : status(s)
00056 {
00057 }
00058
00063 bool signaled() const
00064 {
00065 return WIFSIGNALED(flags_);
00066 }
00067
00075 int term_signal() const
00076 {
00077 BOOST_ASSERT(signaled());
00078
00079 return WTERMSIG(flags_);
00080 }
00081
00090 bool dumped_core() const
00091 {
00092 BOOST_ASSERT(signaled());
00093
00094 return WCOREDUMP(flags_);
00095 }
00096
00101 bool stopped() const
00102 {
00103 return WIFSTOPPED(flags_);
00104 }
00105
00113 int stop_signal() const
00114 {
00115 BOOST_ASSERT(stopped());
00116
00117 return WSTOPSIG(flags_);
00118 }
00119 };
00120
00121 }
00122 }
00123
00124 #endif