summaryrefslogtreecommitdiff
path: root/boost/process/detail/posix/is_running.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/process/detail/posix/is_running.hpp')
-rw-r--r--boost/process/detail/posix/is_running.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/boost/process/detail/posix/is_running.hpp b/boost/process/detail/posix/is_running.hpp
index 0d431a9126..1d92513d1f 100644
--- a/boost/process/detail/posix/is_running.hpp
+++ b/boost/process/detail/posix/is_running.hpp
@@ -16,8 +16,11 @@ namespace boost { namespace process { namespace detail { namespace posix {
// Use the "stopped" state (WIFSTOPPED) to indicate "not terminated".
// This bit arrangement of status codes is not guaranteed by POSIX, but (according to comments in
// the glibc <bits/waitstatus.h> header) is the same across systems in practice.
-constexpr int still_active = 0x7F;
-static_assert(!WIFEXITED(still_active) && !WIFSIGNALED(still_active), "Internal Error");
+constexpr int still_active = 0x017f;
+static_assert(WIFSTOPPED(still_active), "Expected still_active to indicate WIFSTOPPED");
+static_assert(!WIFEXITED(still_active), "Expected still_active to not indicate WIFEXITED");
+static_assert(!WIFSIGNALED(still_active), "Expected still_active to not indicate WIFSIGNALED");
+static_assert(!WIFCONTINUED(still_active), "Expected still_active to not indicate WIFCONTINUED");
inline bool is_running(int code)
{