mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-02 12:55:00 +08:00
Revert "Explicitly nulling chained_wait_prev after munmap()"
This reverts commit 47d8a7e882
.
It was meant for the major branch.
This commit is contained in:
parent
4429518667
commit
c304ca1a1c
|
@ -1071,9 +1071,8 @@ void exec_job(parser_t &parser, job_t *j) {
|
||||||
{
|
{
|
||||||
pid = execute_fork(false);
|
pid = execute_fork(false);
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
// usleep is a hack that fixes any tcsetpgrp errors caused by race conditions
|
// a hack that fixes any tcsetpgrp errors caused by race conditions
|
||||||
// usleep(20 * 1000);
|
// usleep(20 * 1000);
|
||||||
// it should no longer be needed with the chained_wait_next code below.
|
|
||||||
if (chained_wait_next != nullptr) {
|
if (chained_wait_next != nullptr) {
|
||||||
debug(3, L"Waiting for next command in chain to start.\n");
|
debug(3, L"Waiting for next command in chain to start.\n");
|
||||||
sem_wait(chained_wait_next);
|
sem_wait(chained_wait_next);
|
||||||
|
@ -1127,7 +1126,6 @@ void exec_job(parser_t &parser, job_t *j) {
|
||||||
debug(3, L"Unblocking previous command in chain.\n");
|
debug(3, L"Unblocking previous command in chain.\n");
|
||||||
sem_post(chained_wait_prev);
|
sem_post(chained_wait_prev);
|
||||||
munmap(chained_wait_prev, sizeof(sem_t));
|
munmap(chained_wait_prev, sizeof(sem_t));
|
||||||
chained_wait_prev = nullptr;
|
|
||||||
}
|
}
|
||||||
if (chained_wait_next != nullptr) {
|
if (chained_wait_next != nullptr) {
|
||||||
chained_wait_prev = chained_wait_next;
|
chained_wait_prev = chained_wait_next;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user