Revert "Fixed no-op loop hang"

This reverts commit 8537cc982e67d548b08dcc887ff32d338e7ba3e4.
It was meant for the major branch.
This commit is contained in:
Kurtis Rader 2017-08-13 15:27:00 -07:00
parent 4b1bc53f91
commit ac4eedb436

View File

@ -82,9 +82,8 @@ 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 //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) //times to get the kernel to see the new group. (Linux 4.4.0)
int failure = setpgid(p->pid, j->pgid); int failure = setpgid(p->pid, j->pgid);
while (failure == -1 && (errno == EPERM || errno == EINTR)) { while (failure == -1 && errno == EPERM) {
debug_safe(2, "Retrying setpgid in child process"); 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 // 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. // set it failed. This was added in commit 4e912ef8 from 2012-02-27.