From 3d557518d5cd6681fbf9fd23aa18756be8ddfb27 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Sun, 18 Nov 2018 17:37:54 -0600 Subject: [PATCH] Replace 0/1 with true/false in calls to job_reap --- src/exec.cpp | 2 +- src/input.cpp | 6 +++--- src/parse_execution.cpp | 2 +- src/parser.cpp | 4 ++-- src/reader.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/exec.cpp b/src/exec.cpp index 1c93c0e07..0bbd8721b 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -326,7 +326,7 @@ void internal_exec_helper(parser_t &parser, parsed_source_ref_t parsed_source, t morphed_chain.clear(); io_cleanup_fds(opened_fds); - job_reap(0); + job_reap(false); } // Returns whether we can use posix spawn for a given process in a given job. Per diff --git a/src/input.cpp b/src/input.cpp index 66ee11ba1..596800167 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -208,7 +208,7 @@ static bool specification_order_is_less_than(const input_mapping_t &m1, const in /// that we test longer sequences first. static void input_mapping_insert_sorted(const input_mapping_t &new_mapping, bool user = true) { auto& ml = user ? mapping_list : preset_mapping_list; - + std::vector::iterator loc = std::lower_bound( ml.begin(), ml.end(), new_mapping, length_is_greater_than); ml.insert(loc, new_mapping); @@ -230,7 +230,7 @@ void input_mapping_add(const wchar_t *sequence, const wchar_t *const *commands, const wcstring_list_t commands_vector(commands, commands + commands_len); auto& ml = user ? mapping_list : preset_mapping_list; - + for (size_t i = 0; i < ml.size(); i++) { input_mapping_t &m = ml.at(i); if (m.seq == sequence && m.mode == mode) { @@ -256,7 +256,7 @@ static int interrupt_handler() { // Fire any pending events. event_fire(NULL); // Reap stray processes, including printing exit status messages. - if (job_reap(1)) reader_repaint_needed(); + if (job_reap(true)) reader_repaint_needed(); // Tell the reader an event occured. if (reader_reading_interrupted()) { return shell_modes.c_cc[VINTR]; diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp index 48d0134a0..701d41106 100644 --- a/src/parse_execution.cpp +++ b/src/parse_execution.cpp @@ -1251,7 +1251,7 @@ parse_execution_result_t parse_execution_context_t::run_1_job(tnode_t jo profile_item->skipped = !populated_job; } - job_reap(0); // clean up jobs + job_reap(false); // clean up jobs return parse_execution_success; } diff --git a/src/parser.cpp b/src/parser.cpp index dfa69f5dc..b16c86e47 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -684,7 +684,7 @@ int parser_t::eval_node(parsed_source_ref_t ps, tnode_t node, const io_chain_ return 1; } - job_reap(0); // not sure why we reap jobs here + job_reap(false); // not sure why we reap jobs here // Start it up scope_block_t *scope_block = this->push_block(block_type); @@ -697,7 +697,7 @@ int parser_t::eval_node(parsed_source_ref_t ps, tnode_t node, const io_chain_ exc.restore(); this->pop_block(scope_block); - job_reap(0); // reap again + job_reap(false); // reap again return result; } diff --git a/src/reader.cpp b/src/reader.cpp index 624af72d7..bacf59f3c 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -2026,7 +2026,7 @@ void reader_run_command(parser_t &parser, const wcstring &cmd) { gettimeofday(&time_before, NULL); parser.eval(cmd, io_chain_t(), TOP); - job_reap(1); + job_reap(true); gettimeofday(&time_after, NULL);