mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 22:03:12 +00:00
Revert "Don't service ioport completions if data is available on stdin"
This reverts commit 0453023f7b
.
This broke the history tests. Reverting this while I sort it out.
This commit is contained in:
parent
a7b1c2f76a
commit
005e6f2ab8
1 changed files with 7 additions and 9 deletions
|
@ -134,6 +134,13 @@ static char_event_t readb() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ioport > 0 && FD_ISSET(ioport, &fdset)) {
|
||||||
|
iothread_service_completion();
|
||||||
|
if (auto mc = s_lookahead->pop_evt()) {
|
||||||
|
return *mc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (FD_ISSET(STDIN_FILENO, &fdset)) {
|
if (FD_ISSET(STDIN_FILENO, &fdset)) {
|
||||||
unsigned char arr[1];
|
unsigned char arr[1];
|
||||||
if (read_blocked(0, arr, 1) != 1) {
|
if (read_blocked(0, arr, 1) != 1) {
|
||||||
|
@ -144,15 +151,6 @@ static char_event_t readb() {
|
||||||
// We read from stdin, so don't loop.
|
// We read from stdin, so don't loop.
|
||||||
return arr[0];
|
return arr[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for iothread completions only if there is no data to be read from the stdin.
|
|
||||||
// This gives priority to the foreground.
|
|
||||||
if (ioport > 0 && FD_ISSET(ioport, &fdset)) {
|
|
||||||
iothread_service_completion();
|
|
||||||
if (auto mc = s_lookahead->pop_evt()) {
|
|
||||||
return *mc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue