Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-07-17 23:45:05 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-07-17 23:45:05 +0300
commit21883faeb87fa31e209f9ed1de44b3aca89edce2 (patch)
tree2c63039f725f80404408cab49470c171f98d57c0
parent751ce5021b4ad47258db1c8dc7c90ee9155a9211 (diff)
Fix bug where on POSIX, process_handle::is_running() was inverted. Sorry.
-rw-r--r--include/llfio/v2.0/detail/impl/posix/process_handle.ipp6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llfio/v2.0/detail/impl/posix/process_handle.ipp b/include/llfio/v2.0/detail/impl/posix/process_handle.ipp
index 0f6498c4..2679ed25 100644
--- a/include/llfio/v2.0/detail/impl/posix/process_handle.ipp
+++ b/include/llfio/v2.0/detail/impl/posix/process_handle.ipp
@@ -50,9 +50,11 @@ LLFIO_HEADERS_ONLY_MEMFUNC_SPEC bool process_handle::is_running() const noexcept
}
siginfo_t info;
memset(&info, 0, sizeof(info));
- if(-1 == ::waitid(P_PID, _v.pid, &info, WNOHANG | WNOWAIT))
+ if(-1 == ::waitid(P_PID, _v.pid, &info, WEXITED | WNOHANG | WNOWAIT))
+ {
return false;
- return info.si_pid != 0;
+ }
+ return info.si_pid == 0;
}
LLFIO_HEADERS_ONLY_MEMFUNC_SPEC result<process_handle::path_type> process_handle::current_path() const noexcept