diff options
author | David Young <dyoung@hdfgroup.org> | 2020-03-09 18:47:26 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-03-09 18:47:26 (GMT) |
commit | 1818420acd49b7f7954e67b977be460d429837bd (patch) | |
tree | 9c687d7bd1a5342f71aa597b485b7234c5540030 /test/vfd_swmr_common.c | |
parent | d0e6a1bbc63488d445dc21cb6023c9f8f507a5ad (diff) | |
download | hdf5-1818420acd49b7f7954e67b977be460d429837bd.zip hdf5-1818420acd49b7f7954e67b977be460d429837bd.tar.gz hdf5-1818420acd49b7f7954e67b977be460d429837bd.tar.bz2 |
In await_signal(), print a less alarming message when exiting in normal
circumstances.
Write a comment that tells why await_signal() periodically calls the HDF5 API.
Diffstat (limited to 'test/vfd_swmr_common.c')
-rw-r--r-- | test/vfd_swmr_common.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index 9cd604b..6db9bfa 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -66,12 +66,19 @@ await_signal(hid_t fid) const int rc = sigtimedwait(&sleepset, NULL, &tick); if (rc == SIGUSR1) { - printf("Cancelled by SIGUSR1.\n"); + printf("Received SIGUSR1, wrapping things up.\n"); break; } else if (rc == -1 && errno == EAGAIN) { H5E_auto_t efunc; void *edata; + /* Avoid deadlock with peer: periodically enter the API so that + * tick processing occurs and data is flushed so that the peer + * can see it. + * + * The call we make will fail, but that's ok, + * so squelch errors. + */ (void)H5Eget_auto(H5E_DEFAULT, &efunc, &edata); (void)H5Eset_auto(H5E_DEFAULT, NULL, NULL); (void)H5Aexists_by_name(fid, "nonexistent", "nonexistent", |