summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/vfd_swmr_common.c')
-rw-r--r--test/vfd_swmr_common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c
index bf1cc59..7db2bba 100644
--- a/test/vfd_swmr_common.c
+++ b/test/vfd_swmr_common.c
@@ -122,6 +122,12 @@ await_signal(hid_t fid)
__func__, __LINE__);
}
+ /* Avoid deadlock: flush the file before waiting for the reader's
+ * message.
+ */
+ if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
+ errx(EXIT_FAILURE, "%s: H5Fflush failed", __func__);
+
for (;;) {
const int rc = sigtimedwait(&sleepset, NULL, &tick);