From e44f95820ee182460bee2e7569ab4ecb1d444112 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 16 Mar 2017 23:08:10 +0000 Subject: Fixes some clang-tidy warning and add a few missing meta.hh include --- src/shell_manager.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shell_manager.cc') 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 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 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()) -- cgit v1.2.3