diff options
author | 2014-05-06 14:10:55 -0700 | |
---|---|---|
committer | 2014-05-06 14:10:55 -0700 | |
commit | 7763718b60cfef3adbfbd744b9c629ff5c8aa419 (patch) | |
tree | a9526c2f9c37e348456b25dc319c8b2e2aff8a1b /fish_tests.cpp | |
parent | 8a263952adb3275be54cd59c04a657109fe341b7 (diff) |
Further cleanup and rationalization of named pipe universal notifier.
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r-- | fish_tests.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp index 828b0c4b..0f7ef62a 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -2254,7 +2254,7 @@ bool poll_notifier(universal_notifier_t *note) } int fd = note->notification_fd(); - if (fd >= 0) + if (! result && fd >= 0) { fd_set fds; FD_ZERO(&fds); @@ -2350,7 +2350,9 @@ static void test_notifiers_with_strategy(universal_notifier_t::notifier_strategy // Named pipes have special cleanup requirements if (strategy == universal_notifier_t::strategy_named_pipe) { - usleep(1000000 / 10); + usleep(1000000 / 10); //corresponds to NAMED_PIPE_FLASH_DURATION_USEC + // Have to clean up the posted one first, so that the others see the pipe become no longer readable + poll_notifier(notifiers[post_idx]); for (size_t i=0; i < notifier_count; i++) { poll_notifier(notifiers[i]); |