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:
ridiculousfish
2019-02-16 17:35:16 -08:00
parent a95bc849c5
commit ebe2dc2766
3 changed files with 11 additions and 1 deletions

View File

@@ -899,6 +899,7 @@ static bool exec_process_in_job(parser_t &parser, process_t *p, std::shared_ptr<
}
// Execute the process.
p->check_generations_before_launch();
switch (p->type) {
case INTERNAL_FUNCTION:
case INTERNAL_BLOCK_NODE: {