mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 20:32:44 +08:00
Fixed no-op loop hang
This commit is contained in:
parent
d6c4e66484
commit
8537cc982e
|
@ -82,8 +82,9 @@ bool child_set_group(job_t *j, process_t *p) {
|
|||
//because we are SIGSTOPing the previous job in the chain. Sometimes we have to try a few
|
||||
//times to get the kernel to see the new group. (Linux 4.4.0)
|
||||
int failure = setpgid(p->pid, j->pgid);
|
||||
while (failure == -1 && errno == EPERM) {
|
||||
while (failure == -1 && (errno == EPERM || errno == EINTR)) {
|
||||
debug_safe(2, "Retrying setpgid in child process");
|
||||
failure = setpgid(p->pid, j->pgid);
|
||||
}
|
||||
// TODO: Figure out why we're testing whether the pgid is correct after attempting to
|
||||
// set it failed. This was added in commit 4e912ef8 from 2012-02-27.
|
||||
|
|
Loading…
Reference in New Issue
Block a user