mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-19 13:01:15 -03:00
remove unnecessary signal management
The shell was doing a log of signal blocking/unblocking that hurts performance and can be avoided. This reduced the elapsed time for a simple benchmark by 25%. Partial fix for #2007
This commit is contained in:
@@ -367,12 +367,10 @@ static bool can_use_posix_spawn_for_job(const job_t *job, const process_t *proce
|
||||
|
||||
void exec_job(parser_t &parser, job_t *j) {
|
||||
pid_t pid = 0;
|
||||
sigset_t chldset;
|
||||
|
||||
// Set to true if something goes wrong while exec:ing the job, in which case the cleanup code
|
||||
// will kick in.
|
||||
bool exec_error = false;
|
||||
|
||||
bool needs_keepalive = false;
|
||||
process_t keepalive;
|
||||
|
||||
@@ -384,9 +382,6 @@ void exec_job(parser_t &parser, job_t *j) {
|
||||
return;
|
||||
}
|
||||
|
||||
sigemptyset(&chldset);
|
||||
sigaddset(&chldset, SIGCHLD);
|
||||
|
||||
debug(4, L"Exec job '%ls' with id %d", j->command_wcstr(), j->job_id);
|
||||
|
||||
// Verify that all IO_BUFFERs are output. We used to support a (single, hacked-in) magical input
|
||||
|
||||
Reference in New Issue
Block a user