summaryrefslogtreecommitdiff
path: root/src/shell_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-03-16 23:08:10 +0000
committerMaxime Coste <mawww@kakoune.org>2017-03-16 23:34:02 +0000
commite44f95820ee182460bee2e7569ab4ecb1d444112 (patch)
treeeaf60c648066fef5b57512dc6ccc47d8095717e4 /src/shell_manager.cc
parent5f7464d90d0bfe641dd2c7bbbca6e78d92d9d818 (diff)
Fixes some clang-tidy warning and add a few missing meta.hh include
Diffstat (limited to 'src/shell_manager.cc')
-rw-r--r--src/shell_manager.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc
index ad7f18ed..357724b1 100644
--- a/src/shell_manager.cc
+++ b/src/shell_manager.cc
@@ -248,7 +248,7 @@ std::pair<String, int> ShellManager::eval(
int status = 0;
// check for termination now that SIGCHLD is blocked
- bool terminated = waitpid(pid, &status, WNOHANG);
+ bool terminated = waitpid(pid, &status, WNOHANG) != 0;
using namespace std::chrono;
static constexpr seconds wait_timeout{1};
@@ -269,7 +269,7 @@ std::pair<String, int> ShellManager::eval(
{
EventManager::instance().handle_next_events(EventMode::Urgent, &orig_mask);
if (not terminated)
- terminated = waitpid(pid, &status, WNOHANG);
+ terminated = waitpid(pid, &status, WNOHANG) != 0;
}
if (not stderr_contents.empty())