mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-02 17:31:16 -03:00
Processes to record topic generations before execution
The sigchld generation expresses the idea that, if we receive a sigchld signal, the generation will be different than when we last recorded it. A process cannot exit before it has launched, so check the generation count before process launch. This is an optimization that reduces failing waitpid calls.
This commit is contained in:
@@ -324,7 +324,11 @@ static void handle_child_status(pid_t pid, int status) {
|
||||
}
|
||||
}
|
||||
|
||||
process_t::process_t() {}
|
||||
process_t::process_t() = default;
|
||||
|
||||
void process_t::check_generations_before_launch() {
|
||||
gens_ = topic_monitor_t::principal().current_generations();
|
||||
}
|
||||
|
||||
job_t::job_t(job_id_t jobid, io_chain_t bio, std::shared_ptr<job_t> parent)
|
||||
: block_io(std::move(bio)),
|
||||
|
||||
Reference in New Issue
Block a user