mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-22 20:31:15 -03: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user