mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
Fix up SIGIO notifier tests
FreeBSD has the behavior where SIGIO is delivered on a read. Teach the tests how to handle this behavior.
This commit is contained in:
parent
8bb20a8d91
commit
e669c41d1b
1 changed files with 6 additions and 0 deletions
|
@ -3867,6 +3867,12 @@ static void test_notifiers_with_strategy(universal_notifier_t::notifier_strategy
|
|||
|
||||
// Nobody should poll now.
|
||||
for (size_t i = 0; i < notifier_count; i++) {
|
||||
// On BSD, SIGIO may be delivered by read() even if it returns EAGAIN;
|
||||
// that is the polling itself may trigger a SIGIO. Therefore we poll twice.
|
||||
if (strategy == universal_notifier_t::strategy_sigio) {
|
||||
(void)poll_notifier(notifiers[i]);
|
||||
}
|
||||
|
||||
if (poll_notifier(notifiers[i])) {
|
||||
err(L"Universal variable notifier polled true after all changes, with strategy %d",
|
||||
(int)strategy);
|
||||
|
|
Loading…
Reference in a new issue