mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Replace 0/1 with true/false in calls to job_reap
This commit is contained in:
parent
d0085cae3c
commit
3d557518d5
5 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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<input_mapping_t>::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];
|
||||
|
|
|
@ -1251,7 +1251,7 @@ parse_execution_result_t parse_execution_context_t::run_1_job(tnode_t<g::job> jo
|
|||
profile_item->skipped = !populated_job;
|
||||
}
|
||||
|
||||
job_reap(0); // clean up jobs
|
||||
job_reap(false); // clean up jobs
|
||||
return parse_execution_success;
|
||||
}
|
||||
|
||||
|
|
|
@ -684,7 +684,7 @@ int parser_t::eval_node(parsed_source_ref_t ps, tnode_t<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<scope_block_t>(block_type);
|
||||
|
@ -697,7 +697,7 @@ int parser_t::eval_node(parsed_source_ref_t ps, tnode_t<T> node, const io_chain_
|
|||
exc.restore();
|
||||
this->pop_block(scope_block);
|
||||
|
||||
job_reap(0); // reap again
|
||||
job_reap(false); // reap again
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue