Rename HDexit() and related to exit(), etc. (#3202)

* HDatexit
* HDexit
* HD_exit
This commit is contained in:
Dana Robinson 2023-06-29 08:18:01 -07:00 committed by GitHub
parent a5f1fb01b9
commit 9f430d15b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
102 changed files with 481 additions and 490 deletions

View File

@ -218,11 +218,11 @@ H5_init_library(void)
* This must be entered before the library cleanup code so it's
* executed in LIFO order (i.e., last).
*/
(void)HDatexit(H5TS_win32_process_exit);
(void)atexit(H5TS_win32_process_exit);
#endif /* H5_HAVE_THREADSAFE && H5_HAVE_WIN_THREADS */
/* Normal library termination code */
(void)HDatexit(H5_term_library);
(void)atexit(H5_term_library);
H5_dont_atexit_g = TRUE;
} /* end if */

View File

@ -334,7 +334,7 @@ H5FD_subfiling_init(void)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID,
"MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE");
if (HDatexit(H5FD__subfiling_mpi_finalize) < 0)
if (atexit(H5FD__subfiling_mpi_finalize) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID,
"can't register atexit handler for MPI_Finalize");
}

View File

@ -617,9 +617,6 @@ typedef off_t h5_stat_size_t;
#ifndef HDasctime
#define HDasctime(T) asctime(T)
#endif
#ifndef HDatexit
#define HDatexit(F) atexit(F)
#endif
#ifndef HDceil
#define HDceil(X) ceil(X)
#endif
@ -644,12 +641,6 @@ typedef off_t h5_stat_size_t;
#ifndef HDdifftime
#define HDdifftime(X, Y) difftime(X, Y)
#endif
#ifndef HDexit
#define HDexit(N) exit(N)
#endif
#ifndef HD_exit
#define HD_exit(N) _exit(N)
#endif
#ifndef HDfabs
#define HDfabs(X) fabs(X)
#endif

View File

@ -309,5 +309,5 @@ done:
MPI_Finalize();
#endif
HDexit(((err_occurred || n_tests_failed_g > 0) ? EXIT_FAILURE : EXIT_SUCCESS));
exit(((err_occurred || n_tests_failed_g > 0) ? EXIT_FAILURE : EXIT_SUCCESS));
}

View File

@ -722,10 +722,10 @@ main(int argc, char *argv[])
/* No need to print anything since PerformTests() already does. */
if (nerrors /* GetTestNumErrs() */ > 0) {
printf("** HDF5 tests failed with %d errors **\n", nerrors);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
else {
printf("** HDF5 tests ran successfully **\n");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
} /* end main() */

View File

@ -933,11 +933,11 @@ main(void)
if (nerrors) {
printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
printf("All bit tests passed.\n");
H5close();
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end main() */

View File

@ -34069,7 +34069,7 @@ main(void)
if (!h5_using_default_driver(NULL)) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
if (create_entry_arrays() < 0) {

View File

@ -171,10 +171,10 @@ main(void)
if (nerrors) {
printf("***** %d Metadata cache logging TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
printf("All Metadata Cache Logging tests passed.\n");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}

View File

@ -4574,7 +4574,7 @@ main(void)
/* Only run with sec2/default driver */
if (!h5_using_default_driver(NULL)) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* ========== */

View File

@ -2217,7 +2217,7 @@ main(int argc, char *argv[])
if (argc > 1) {
if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) {
fprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1,
(H5T_conv_t)((void (*)(void))H5T__conv_struct_opt));
@ -2250,7 +2250,7 @@ main(int argc, char *argv[])
if (nerrors) {
printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
h5_cleanup(FILENAME, fapl_id);

View File

@ -364,11 +364,11 @@ main(void)
*/
if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0) {
HDputs(" -- couldn't check if VFD is compatible with default VFD --");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
if (!driver_is_default_compatible) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
HDputs("\n");

View File

@ -37,7 +37,7 @@ static const char *FILENAME[] = {"del_many_dense_attrs", NULL};
static void
catch_signal(int H5_ATTR_UNUSED signo)
{
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* catch_signal() */
/*-------------------------------------------------------------------------

View File

@ -15848,7 +15848,7 @@ main(void)
free(points_dbl_data);
free(check_dbl_data);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
free(points);
@ -15863,5 +15863,5 @@ error:
nerrors = MAX(1, nerrors);
printf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -414,7 +414,7 @@ fpe_handler(int H5_ATTR_UNUSED signo)
HDputs(" Remaining tests could not be run.");
HDputs(" Please turn off SIGFPE on overflows and try again.");
#endif
HDexit(255);
exit(255);
}
/*-------------------------------------------------------------------------
@ -3305,9 +3305,9 @@ done:
HDfflush(stdout);
#ifdef HANDLE_SIGFPE
if (run_test == TEST_NOOP || run_test == TEST_NORMAL)
HDexit(MIN((int)fails_all_tests, 254));
exit(MIN((int)fails_all_tests, 254));
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
assert(0 && "Should not reach this point!");
return 1;
#else
@ -3334,9 +3334,9 @@ error:
HDfflush(stdout);
#ifdef HANDLE_SIGFPE
if (run_test == TEST_NOOP || run_test == TEST_NORMAL)
HDexit(MIN(MAX((int)fails_all_tests, 1), 254));
exit(MIN(MAX((int)fails_all_tests, 1), 254));
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
assert(0 && "Should not reach this point!");
return 1;
#else
@ -5230,7 +5230,7 @@ main(void)
if (nerrors) {
printf("***** %lu FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
printf("All data type tests passed.\n");
return 0;

View File

@ -8890,7 +8890,7 @@ main(void)
if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0) {
printf("Can't check if driver is parallel-enabled\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (ALIGNMENT)
@ -8963,7 +8963,7 @@ main(void)
if (nerrors) {
printf("***** %lu FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
printf("All datatype tests passed.\n");

View File

@ -698,9 +698,9 @@ main(void)
/* Report status */
HDputs("All event set tests passed.");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDputs("***** EVENT SET TESTS FAILED *****");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -957,7 +957,7 @@ main(void)
printf("All evict-on-close tests passed.\n");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
@ -971,7 +971,7 @@ error:
}
H5E_END_TRY
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */
@ -1049,13 +1049,13 @@ main(void)
printf("All evict-on-close tests passed.\n");
printf("Note that EoC is not supported under parallel so most tests are skipped.\n");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
printf("***** %u evict-on-close test%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* main() - parallel */

View File

@ -339,7 +339,7 @@ main(void)
if (nerrors) {
printf("***** %d FAILURE%s! *****\n", nerrors, (1 == nerrors) ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
printf("All extend tests passed.\n");
@ -350,7 +350,7 @@ main(void)
free(buf2);
free(buf2_data);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
@ -360,5 +360,5 @@ error:
free(buf2_data);
printf("*** One or more extend tests failed ***\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -1792,7 +1792,7 @@ main(void)
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDputs("*** TESTS FAILED ***");
@ -1806,5 +1806,5 @@ error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -34,7 +34,7 @@
static void
catch_signal(int H5_ATTR_UNUSED signo)
{
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* catch_signal() */
/*-------------------------------------------------------------------------
@ -80,7 +80,7 @@ main(void)
if (!contig_addr_vfd) {
SKIPPED();
HDputs(" Temporary skipped for a spilt/multi driver");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
h5_reset();
@ -136,9 +136,9 @@ main(void)
/* The file is not closed. */
/* The library will call H5_term_library to shut down the library. */
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDputs("*** TEST FAILED ***");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}

View File

@ -2649,7 +2649,7 @@ main(int argc, char *argv[])
test_compact = 1;
else {
fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
} /* end for */
} /* end if */
@ -2725,9 +2725,9 @@ main(int argc, char *argv[])
if (h5_cleanup(FILENAME, fapl))
HDremove(FILE_NAME_RAW);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDputs("***** FILL VALUE TESTS FAILED *****");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}

View File

@ -416,11 +416,11 @@ main(void)
if (nerrors)
TEST_ERROR;
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
if (nerrors) {
printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
} /* end main() */

View File

@ -1619,7 +1619,7 @@ main(void)
printf("All plugin tests passed.\n");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
H5E_BEGIN_TRY
@ -1638,5 +1638,5 @@ error:
nerrors = MAX(1, nerrors);
printf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -323,7 +323,7 @@ main(void)
STACK_ERROR;
/* _exit() is necessary since we want a hard close of the library */
HD_exit(EXIT_SUCCESS);
_exit(EXIT_SUCCESS);
error:
H5E_BEGIN_TRY
@ -332,5 +332,5 @@ error:
}
H5E_END_TRY
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -256,12 +256,12 @@ main(void)
if (h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_vfd_compatible) < 0) {
printf("Can't check if VFD is compatible with default VFD\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (!driver_is_default_vfd_compatible) {
printf("Skipping SWMR tests for VFD incompatible with default VFD\n");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* TEST 1 */
@ -437,8 +437,8 @@ main(void)
h5_cleanup(FILENAME, fapl_id);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -2918,7 +2918,7 @@ main(void)
api_ctx_pushed = FALSE;
h5_cleanup(FILENAME, fapl);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDputs("*** TESTS FAILED ***");
@ -2931,5 +2931,5 @@ error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* main() */

View File

@ -1325,8 +1325,8 @@ main(void)
if (H5Fclose(file) < 0)
TEST_ERROR;
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -608,7 +608,7 @@ main(void)
api_ctx_pushed = FALSE;
h5_cleanup(FILENAME, fapl_id);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
H5E_BEGIN_TRY
@ -621,5 +621,5 @@ error:
H5CX_pop(FALSE);
HDputs("*** TESTS FAILED ***");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -1168,7 +1168,7 @@ main(int argc, char *argv[])
size_of_test |= TEST_MEDIUM;
else {
printf("unrecognized argument: %s\n", argv[i]);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end else */
} /* end for */
} /* end else */
@ -1385,7 +1385,7 @@ main(int argc, char *argv[])
printf("***** %d HYPERSLAB TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
if (HDisatty(1))
printf("(Redirect output to a pager or a file to see debug output)\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
printf("All hyperslab tests passed.\n");
@ -1394,5 +1394,5 @@ main(int argc, char *argv[])
H5close();
#endif /* H5_HAVE_THREADSAFE */
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}

View File

@ -624,7 +624,7 @@ main(int argc, char *argv[])
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
printf("Cannot create file %s; test aborted\n", filename);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Initialize chunk dimensions */
@ -691,12 +691,12 @@ main(int argc, char *argv[])
if (nerrors) {
printf("***** %d I-STORE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
printf("All i-store tests passed.\n");
h5_cleanup(FILENAME, fapl);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}

View File

@ -22942,7 +22942,7 @@ main(void)
/* Results */
if (nerrors) {
printf("***** %d LINK TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
printf("All link tests passed.\n");
@ -22954,9 +22954,9 @@ main(void)
HDrmdir(TMPDIR);
HDrmdir(TMPDIR2);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDputs("*** TESTS FAILED ***");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -161,7 +161,7 @@ main(void)
/* Splitter VFD has issues with external links */
if (!HDstrcmp(env_h5_drvr, "splitter")) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
h5_reset();
@ -184,16 +184,16 @@ main(void)
if (nerrors) {
printf("***** %d External Link (HDF5_EXT_PREFIX) test%s FAILED! *****\n", nerrors,
1 == nerrors ? "" : "s");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
printf("All external Link (HDF5_EXT_PREFIX) tests passed.\n");
/* clean up tmp_links_env directory created by external link tests */
HDrmdir(TMPDIR);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDputs("*** TESTS FAILED ***");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -2431,12 +2431,12 @@ main(int argc, char **argv)
if (parse_args(argc, argv, &opts) < 0) {
printf("Unable to parse arguments\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (confirm_server(&opts) < 0) {
printf("Unable to confirm server is running\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* TESTS */

View File

@ -17658,7 +17658,7 @@ main(void)
/* Results */
if (nerrors) {
printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S"));
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
HDputs("All object copying tests passed.");
@ -17688,8 +17688,8 @@ main(void)
h5_cleanup(FILENAME, fapl);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* main */

View File

@ -1972,7 +1972,7 @@ main(void)
/* Results */
if (nerrors) {
printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S"));
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
HDputs("All object copying tests passed.");
@ -2002,8 +2002,8 @@ main(void)
h5_cleanup(FILENAME, fapl);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* main */

View File

@ -4925,7 +4925,7 @@ main(void)
if ((0 != HDstrcmp(env_h5_drvr, "nomatch")) && (0 != HDstrcmp(env_h5_drvr, "sec2"))) {
SKIPPED();
HDputs("Onion VFD test skipped due to non-sec2 default VFD");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* Initialize */

View File

@ -2111,7 +2111,7 @@ main(void)
SKIPPED();
HDputs("Skip page buffering test because paged aggregation is disabled for multi/split drivers");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end if */
if ((fapl = h5_fileaccess()) < 0) {
@ -2151,7 +2151,7 @@ main(void)
HDputs("All Page Buffering tests passed.");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
printf("***** %d Page Buffering TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
@ -2165,5 +2165,5 @@ error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* main() */

View File

@ -3270,11 +3270,11 @@ main(void)
h5_cleanup(FILENAME, fapl);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
nerrors = MAX(1, nerrors);
printf("***** %d SELECTION I/O DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -2509,12 +2509,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Should fail */
@ -2525,13 +2525,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY
if (fid >= 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* close unused read end for out_pdf */
@ -2591,84 +2591,84 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* close unused read end for in_pdf */
if (HDclose(in_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Should succeed in opening the test file 2 times */
if ((child_fid1 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if ((child_fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* open "dataset" 2 times */
if ((child_did1 = H5Dopen2(child_fid1, "dataset", H5P_DEFAULT)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if ((child_did2 = H5Dopen2(child_fid2, "dataset", H5P_DEFAULT)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Read from "dataset" via child_did1 */
rdata = 0;
if (H5Dread(child_did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (rdata != 88)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Notify parent process */
child_notify = 2;
if (HDwrite(in_pdf[1], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 3) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Refresh "dataset" via child_did2 */
if (H5Drefresh(child_did2) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Read from "dataset" child_did2 */
rdata = 0;
if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (rdata != 99)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Read from "dataset" child_did1 */
rdata = 0;
if (H5Dread(child_did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (rdata != 99)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the dataset */
if (H5Dclose(child_did1))
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (H5Dclose(child_did2))
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the file */
if (H5Fclose(child_fid1) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (H5Fclose(child_fid2) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (HDclose(in_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* close unused read end for out_pdf */
@ -2780,12 +2780,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Should fail in opening the test file */
@ -2795,9 +2795,9 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY
if (fid >= 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end if */
/* close unused read end for out_pdf */
@ -2856,12 +2856,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Should fail in opening the test file */
@ -2871,13 +2871,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY
if (fid >= 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end if */
/* close unused read end for out_pdf */
@ -2936,12 +2936,12 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Should fail in opening the test file */
@ -2951,13 +2951,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY
if (fid >= 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* close unused read end for out_pdf */
@ -5245,12 +5245,12 @@ test_file_lock_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -5262,13 +5262,13 @@ test_file_lock_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -5322,12 +5322,12 @@ test_file_lock_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Opens the test file */
@ -5339,13 +5339,13 @@ test_file_lock_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -5400,12 +5400,12 @@ test_file_lock_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Opens the test file */
@ -5417,13 +5417,13 @@ test_file_lock_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* close unused read end for out_pdf */
@ -5478,12 +5478,12 @@ test_file_lock_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Opens the test file */
@ -5497,16 +5497,16 @@ test_file_lock_concur(hid_t in_fapl)
if (child_fid >= 0) {
/* Close the file */
if (H5Fclose(child_fid) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end if */
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* close unused read end for out_pdf */
@ -5642,12 +5642,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -5659,13 +5659,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -5720,12 +5720,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -5737,13 +5737,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -5798,12 +5798,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -5815,13 +5815,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -5875,12 +5875,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -5892,13 +5892,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -5952,12 +5952,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -5971,14 +5971,14 @@ test_file_lock_swmr_concur(hid_t in_fapl)
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
FAIL_STACK_ERROR;
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -6032,12 +6032,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -6049,13 +6049,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -6110,12 +6110,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -6127,13 +6127,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -6188,12 +6188,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -6205,13 +6205,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -6266,12 +6266,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -6285,14 +6285,14 @@ test_file_lock_swmr_concur(hid_t in_fapl)
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
FAIL_STACK_ERROR;
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -6347,12 +6347,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -6363,14 +6363,14 @@ test_file_lock_swmr_concur(hid_t in_fapl)
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
FAIL_STACK_ERROR;
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -6425,12 +6425,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -6442,13 +6442,13 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should fail */
if (child_fid == FAIL)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Close unused read end for out_pdf */
@ -6503,12 +6503,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open the test file */
@ -6522,14 +6522,14 @@ test_file_lock_swmr_concur(hid_t in_fapl)
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
FAIL_STACK_ERROR;
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* close unused read end for out_pdf */
@ -6685,12 +6685,12 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Open and close the test file */
@ -6703,12 +6703,12 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (H5I_INVALID_HID == child_fid || FAIL == ret)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
else
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end child process work */
/* close unused read end for out_pdf */
@ -7186,96 +7186,96 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused write end for out_pdf */
if (HDclose(out_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* close unused read end for in_pdf */
if (HDclose(in_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 1)
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Open the file 2 times */
if ((child_fid1 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if ((child_fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Open the dataset 2 times */
if ((child_did1 = H5Dopen2(child_fid1, "dataset", H5P_DEFAULT)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if ((child_did2 = H5Dopen2(child_fid2, "dataset", H5P_DEFAULT)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Get the dataset's dataspace via did1 */
if ((child_sid = H5Dget_space(child_did1)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (H5Sget_simple_extent_dims(child_sid, tdims, NULL) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (tdims[0] != 1)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Read from the dataset via did2 */
if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Verify the data is correct */
if (rbuf[0] != 99)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Notify parent process */
child_notify = 2;
if (HDwrite(in_pdf[1], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Wait for notification from parent process */
while (child_notify != 3)
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Refresh dataset via did1 */
if (H5Drefresh(child_did1) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Get the dataset's dataspace and verify */
if ((child_sid = H5Dget_space(child_did1)) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (H5Sget_simple_extent_dims(child_sid, tdims, NULL) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (tdims[0] != 2)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Read from the dataset */
if (H5Dread(child_did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Verify the data is correct */
if (rbuf[0] != 100 || rbuf[1] != 100)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the 2 datasets */
if (H5Dclose(child_did1) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (H5Dclose(child_did2) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the 2 files */
if (H5Fclose(child_fid1) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (H5Fclose(child_fid2) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/* Close the pipes */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (HDclose(in_pdf[1]) < 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* Close unused read end for out_pdf */

View File

@ -278,7 +278,7 @@ usage(void)
printf("Defaults to verbose (no '-q' given), flushing every 1000 operations\n");
printf("('-f 1000'), and will generate a random seed (no -r given).\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
int
@ -378,7 +378,7 @@ main(int argc, char *argv[])
/* Open file skeleton */
if ((fid = open_skeleton(FILENAME, verbose)) < 0) {
fprintf(stderr, "Error opening skeleton file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@ -391,7 +391,7 @@ main(int argc, char *argv[])
/* Grow and shrink datasets */
if (addrem_records(fid, verbose, (unsigned long)nops, (unsigned long)flush_count) < 0) {
fprintf(stderr, "Error adding and removing records from datasets!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -401,7 +401,7 @@ main(int argc, char *argv[])
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
fprintf(stderr, "Error releasing symbols!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -411,7 +411,7 @@ main(int argc, char *argv[])
/* Close objects opened */
if (H5Fclose(fid) < 0) {
fprintf(stderr, "Error closing file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -253,7 +253,7 @@ usage(void)
printf("compression ('-c -1'), v1 b-tree indexing (-i b1), and will generate a random\n");
printf("seed (no -r given).\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end usage() */
int
@ -347,7 +347,7 @@ main(int argc, char *argv[])
/* Generate file skeleton */
if (gen_skeleton(FILENAME, verbose, swmr_write, comp_level, index_type, random_seed) < 0) {
fprintf(stderr, "Error generating skeleton file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -382,7 +382,7 @@ usage(void)
printf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n");
printf("and will generate a random seed (no -r given).\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
int
@ -484,7 +484,7 @@ main(int argc, char *argv[])
HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed);
if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
} /* end if */
@ -507,7 +507,7 @@ main(int argc, char *argv[])
/* Generate dataset names */
if (generate_symbols() < 0) {
fprintf(stderr, "Error generating symbol names!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Create datatype for creating datasets */
@ -518,7 +518,7 @@ main(int argc, char *argv[])
if (read_records(FILENAME, verbose, verbose_file, random_seed, (unsigned long)nseconds,
(unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) {
fprintf(stderr, "Error reading records from datasets (random_seed = %u)!\n", random_seed);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -528,7 +528,7 @@ main(int argc, char *argv[])
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
fprintf(stderr, "Error releasing symbols!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -538,7 +538,7 @@ main(int argc, char *argv[])
/* Close objects created */
if (H5Tclose(symbol_tid) < 0) {
fprintf(stderr, "Error closing symbol datatype!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -366,7 +366,7 @@ usage(void)
printf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n");
printf("and will generate a random seed (no -r given).\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
int
@ -477,7 +477,7 @@ main(int argc, char *argv[])
/* Generate dataset names */
if (generate_symbols() < 0) {
fprintf(stderr, "Error generating symbol names!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Create datatype for creating datasets */
@ -488,7 +488,7 @@ main(int argc, char *argv[])
if (read_records(FILENAME, verbose, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon,
(unsigned)nrandom) < 0) {
fprintf(stderr, "Error reading records from datasets!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -498,7 +498,7 @@ main(int argc, char *argv[])
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
fprintf(stderr, "Error releasing symbols!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -508,7 +508,7 @@ main(int argc, char *argv[])
/* Close objects created */
if (H5Tclose(symbol_tid) < 0) {
fprintf(stderr, "Error closing symbol datatype!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -212,7 +212,7 @@ usage(void)
printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
printf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
int
@ -316,7 +316,7 @@ main(int argc, char *argv[])
/* Open file skeleton */
if ((fid = open_skeleton(FILENAME, verbose, old)) < 0) {
fprintf(stderr, "Error opening skeleton file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@ -329,7 +329,7 @@ main(int argc, char *argv[])
/* Remove records from datasets */
if (remove_records(fid, verbose, (unsigned long)nshrinks, (unsigned long)flush_count) < 0) {
fprintf(stderr, "Error removing records from datasets!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -339,7 +339,7 @@ main(int argc, char *argv[])
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
fprintf(stderr, "Error releasing symbols!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -349,7 +349,7 @@ main(int argc, char *argv[])
/* Close objects opened */
if (H5Fclose(fid) < 0) {
fprintf(stderr, "Error closing file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -336,7 +336,7 @@ usage(void)
printf("Note that the # of records *must* be the same as that supplied to\n");
printf("swmr_sparse_writer\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end usage() */
int
@ -409,7 +409,7 @@ main(int argc, char *argv[])
/* Generate dataset names */
if (generate_symbols() < 0) {
fprintf(stderr, "Error generating symbol names!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Create datatype for creating datasets */
@ -420,7 +420,7 @@ main(int argc, char *argv[])
if (read_records(FILENAME, verbose, (unsigned long)nrecords, (unsigned)poll_time,
(unsigned)reopen_count) < 0) {
fprintf(stderr, "Error reading records from datasets!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -430,7 +430,7 @@ main(int argc, char *argv[])
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
fprintf(stderr, "Error releasing symbols!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -440,7 +440,7 @@ main(int argc, char *argv[])
/* Close objects created */
if (H5Tclose(symbol_tid) < 0) {
fprintf(stderr, "Error closing symbol datatype!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -313,7 +313,7 @@ usage(void)
printf("Defaults to verbose (no '-q' given) and flushing every 1000 records\n");
printf("('-f 1000')\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
int
@ -389,7 +389,7 @@ main(int argc, char *argv[])
/* Open file skeleton */
if ((fid = open_skeleton(FILENAME, verbose)) < 0) {
fprintf(stderr, "Error opening skeleton file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@ -402,7 +402,7 @@ main(int argc, char *argv[])
/* Append records to datasets */
if (add_records(fid, verbose, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
fprintf(stderr, "Error appending records to datasets!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -412,7 +412,7 @@ main(int argc, char *argv[])
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
fprintf(stderr, "Error releasing symbols!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -422,7 +422,7 @@ main(int argc, char *argv[])
/* Close objects opened */
if (H5Fclose(fid) < 0) {
fprintf(stderr, "Error closing file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -340,7 +340,7 @@ usage(void)
printf("v1 b-tree indexing (-i b1), compression ('-c -1'),\n");
printf("will generate a random seed (no -r given), and verbose (no '-q' given)\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* usage() */
/*
@ -451,7 +451,7 @@ main(int argc, char *argv[])
HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
} /* end if */
@ -470,7 +470,7 @@ main(int argc, char *argv[])
/* Create the test file */
if ((fid = create_file(FILENAME, verbose, verbose_file, random_seed)) < 0) {
fprintf(stderr, "Error creating the file...\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Emit informational message */
@ -484,13 +484,13 @@ main(int argc, char *argv[])
/* Create the datasets in the file */
if (create_datasets(fid, comp_level, verbose, verbose_file, index_type) < 0) {
fprintf(stderr, "Error creating datasets...\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Enable SWMR writing mode */
if (H5Fstart_swmr_write(fid) < 0) {
fprintf(stderr, "Error starting SWMR writing mode...\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@ -503,7 +503,7 @@ main(int argc, char *argv[])
/* Append records to datasets */
if (add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
fprintf(stderr, "Error appending records to datasets!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -513,7 +513,7 @@ main(int argc, char *argv[])
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
fprintf(stderr, "Error releasing symbols!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -523,7 +523,7 @@ main(int argc, char *argv[])
/* Close objects opened */
if (H5Fclose(fid) < 0) {
fprintf(stderr, "Error closing file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -270,7 +270,7 @@ usage(void)
printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
printf("flushing every 10000 records ('-f 10000'), and will generate a random seed (no -r given).\n");
printf("\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
int
@ -359,7 +359,7 @@ main(int argc, char *argv[])
HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if (NULL == (verbose_file = HDfopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
} /* end if */
@ -388,7 +388,7 @@ main(int argc, char *argv[])
/* Open file skeleton */
if ((fid = open_skeleton(FILENAME, verbose, verbose_file, random_seed, old)) < 0) {
fprintf(stderr, "Error opening skeleton file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@ -401,7 +401,7 @@ main(int argc, char *argv[])
/* Append records to datasets */
if (add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
fprintf(stderr, "Error appending records to datasets!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -411,7 +411,7 @@ main(int argc, char *argv[])
/* Clean up the symbols */
if (shutdown_symbols() < 0) {
fprintf(stderr, "Error releasing symbols!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@ -421,7 +421,7 @@ main(int argc, char *argv[])
/* Close objects opened */
if (H5Fclose(fid) < 0) {
fprintf(stderr, "Error closing file!\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
return 0;

View File

@ -63,7 +63,7 @@ parse(int ac, char **av)
pt = *(++av);
if (*pt != '-') {
fprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
else {
switch (*(++pt)) {
@ -80,15 +80,15 @@ parse(int ac, char **av)
break;
default:
fprintf(stderr, "Unknown -v parameter (%s). Aborted.\n", *av);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
break;
case 'h': /* help page */
showhelp();
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
default:
fprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
}
@ -106,7 +106,7 @@ parse(int ac, char **av)
H5_ATTR_NORETURN void
abort_intercept(int H5_ATTR_UNUSED sig)
{
HDexit(6);
exit(6);
}
#ifdef H5_HAVE_WIN32_API

View File

@ -73,11 +73,11 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
/* Sanity checking */
if (HDstrlen(TheDescr) >= MAXTESTDESC) {
printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDstrlen(TheName) >= MAXTESTNAME) {
printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Check for increasing the Test array size */
@ -89,7 +89,7 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
if (NULL == (newTest = (TestStruct *)realloc(Test, newAlloc * sizeof(TestStruct)))) {
printf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc,
newAlloc);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Update info */
@ -230,7 +230,7 @@ TestParseCmdLine(int argc, char *argv[])
}
else {
TestUsage();
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-exclude") == 0) || (HDstrcmp(*argv, "-x") == 0))) {
@ -241,7 +241,7 @@ TestParseCmdLine(int argc, char *argv[])
}
else {
TestUsage();
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-begin") == 0) || (HDstrcmp(*argv, "-b") == 0))) {
@ -252,7 +252,7 @@ TestParseCmdLine(int argc, char *argv[])
}
else {
TestUsage();
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-only") == 0) || (HDstrcmp(*argv, "-o") == 0))) {
@ -272,7 +272,7 @@ TestParseCmdLine(int argc, char *argv[])
}
else {
TestUsage();
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
@ -281,7 +281,7 @@ TestParseCmdLine(int argc, char *argv[])
enable_error_stack = 1;
else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
TestUsage();
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
SetTestNoCleanup();
@ -295,7 +295,7 @@ TestParseCmdLine(int argc, char *argv[])
if (NULL != TestPrivateParser) {
ret_code = TestPrivateParser(argc + 1, argv - 1);
if (ret_code != 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}

View File

@ -89,7 +89,7 @@ main(int argc, char *argv[])
/* Exit failure if errors encountered; else exit success. */
/* No need to print anything since PerformTests() already does. */
if (GetTestNumErrs() > 0)
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
else
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end main() */

View File

@ -39,7 +39,7 @@ my_errx(int code, const char *fmt, ...)
(void)HDvfprintf(stderr, fmt, ap);
va_end(ap);
(void)HDfputc('\n', stderr);
HDexit(code);
exit(code);
}
#if defined(H5_HAVE_DARWIN)
@ -181,7 +181,7 @@ my_err(int code, const char *fmt, ...)
(void)HDvfprintf(stderr, fmt, ap);
va_end(ap);
(void)fprintf(stderr, ": %s\n", HDstrerror(errno_copy));
HDexit(code);
exit(code);
}
#define threads_failure(_call, _result) \

View File

@ -136,7 +136,7 @@ parse_option(int argc, char *const argv[])
switch (c) {
case 'h':
usage(progname_g);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
break;
case 'b': /* number of planes to write/read */
if ((blocksize_g = atoi(optarg)) <= 0) {
@ -395,12 +395,12 @@ main(int argc, char *argv[])
printf("%d: launch reader process\n", mypid);
if (read_wo_file() < 0) {
fprintf(stderr, "read_wo_file encountered error\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Reader is done. Clean up by removing the data file */
HDremove(DATAFILE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
}

View File

@ -3076,15 +3076,15 @@ main(void)
if (nerrors) {
printf("***** %d FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
HDputs("All unlink tests passed.");
h5_cleanup(FILENAME, fapl);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -305,7 +305,7 @@ main(void)
FAIL_STACK_ERROR;
api_ctx_pushed = FALSE;
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
nerrors = MAX(1, nerrors);
@ -314,5 +314,5 @@ error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -185,17 +185,17 @@ main(int argc, char *argv[])
printf("%d: launch reader process\n", mypid);
if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
fprintf(stderr, "can't create read FAPL\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (read_uc_file(send_wait, &UC_opts) < 0) {
fprintf(stderr, "read_uc_file encountered error\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (H5Pclose(UC_opts.fapl_id) < 0) {
fprintf(stderr, "can't close read FAPL\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
}

View File

@ -279,10 +279,10 @@ main(int argc, char *argv[])
UC_opts.fapl_id = H5P_DEFAULT;
if (read_uc_file(send_wait, &UC_opts) < 0) {
fprintf(stderr, "read_uc_file encountered error (%d)\n", mypid);
HDexit(1);
exit(1);
}
HDexit(0);
exit(0);
}
}

View File

@ -179,17 +179,17 @@ main(int argc, char *argv[])
printf("%d: launch reader process\n", mypid);
if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
fprintf(stderr, "can't create read FAPL\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (read_uc_file(send_wait, &UC_opts) < 0) {
fprintf(stderr, "read_uc_file encountered error\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (H5Pclose(UC_opts.fapl_id) < 0) {
fprintf(stderr, "can't close read FAPL\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
}

View File

@ -66,7 +66,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
switch (c) {
case 'h':
usage(opts->progname);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
opts->filename = HDstrdup(optarg);

View File

@ -102,7 +102,7 @@ parse_option(int argc, char *const argv[])
switch (c) {
case 'h':
usage(progname_g);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
filename_g = optarg;
@ -543,7 +543,7 @@ int
main(void)
{
fprintf(stderr, "Non-POSIX platform. Skipping.\n");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end main() */
#endif /* H5_HAVE_UNISTD_H */

View File

@ -12325,7 +12325,7 @@ main(void)
*/
if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));

View File

@ -348,7 +348,7 @@ main(void)
*/
if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/* Set to use the latest file format */

View File

@ -5954,7 +5954,7 @@ main(void)
env_h5_drvr = HDgetenv(HDF5_DRIVER);
if (env_h5_drvr) {
printf(" -- SKIPPED VFD tests because %s is set -- \n", HDF5_DRIVER);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
h5_reset();

View File

@ -430,10 +430,10 @@ main(void)
if (nerrors) {
printf("***** %d VFD plugin TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
HDputs("All VFD plugin tests passed.");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}

View File

@ -2656,11 +2656,11 @@ main(void)
if (nerrors) {
printf("***** %d Virtual Object Layer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
HDputs("All Virtual Object Layer (VOL) tests passed.");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end main() */

View File

@ -343,11 +343,11 @@ main(void)
if (nerrors) {
printf("***** %d VOL connector plugin TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
HDputs("All VOL connector plugin tests passed.");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end main() */

View File

@ -189,7 +189,7 @@ main(int argc, char **argv)
*/
if (MPI_SUCCESS != MPI_Init_thread(&argc, &argv, required, &provided)) {
fprintf(stderr, "MPI_Init_thread failed\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@ -442,7 +442,7 @@ main(int argc, char **argv)
MPI_Finalize();
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
free(vol_connector_string_copy);
@ -457,5 +457,5 @@ error:
MPI_Finalize();
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}

View File

@ -1740,7 +1740,7 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size)
if (!serial_insert_cache_image(file_name_idx, mpi_size)) {
fprintf(stderr, "\n\nCache image insertion failed.\n");
fprintf(stderr, " failure mssg = \"%s\"\n", failure_mssg);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
}
@ -3606,7 +3606,7 @@ main(int argc, char **argv)
}
else {
printf("failed.\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
i++;
}

View File

@ -142,7 +142,7 @@ main(int argc, char *argv[])
HDputs(" Test not compatible with current Virtual File Driver");
}
MPI_Finalize();
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g))))
@ -207,7 +207,7 @@ main(int argc, char *argv[])
* always ignore the failure condition than to handle some
* platforms returning success and others failure.
*/
HD_exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
error:
HDfflush(stdout);
@ -219,5 +219,5 @@ error:
if (data_g)
free(data_g);
HD_exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
} /* end main() */

View File

@ -167,7 +167,7 @@ main(int argc, char *argv[])
HDputs(" Test not compatible with current Virtual File Driver");
}
MPI_Finalize();
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g))))
@ -223,11 +223,11 @@ main(int argc, char *argv[])
MPI_Finalize();
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
if (data_g)
free(data_g);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -1078,17 +1078,17 @@ main(int argc, char **argv)
if ((MPI_Init(&argc, &argv)) != MPI_SUCCESS) {
fprintf(stderr, "FATAL: Unable to initialize MPI\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if ((MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank)) != MPI_SUCCESS) {
fprintf(stderr, "FATAL: MPI_Comm_rank returned an error\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if ((MPI_Comm_size(MPI_COMM_WORLD, &mpi_size)) != MPI_SUCCESS) {
fprintf(stderr, "FATAL: MPI_Comm_size returned an error\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
H5open();
@ -1122,7 +1122,7 @@ main(int argc, char **argv)
if ((MPI_Comm_split(MPI_COMM_WORLD, which_group, 0, &group_comm)) != MPI_SUCCESS) {
fprintf(stderr, "FATAL: MPI_Comm_split returned an error\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* ------ Generate all files ------ */

View File

@ -2469,7 +2469,7 @@ exit:
MPI_Finalize();
HDexit(nerrors ? EXIT_FAILURE : EXIT_SUCCESS);
exit(nerrors ? EXIT_FAILURE : EXIT_SUCCESS);
}
#else /* H5_HAVE_SUBFILING_VFD */
@ -2480,7 +2480,7 @@ main(void)
h5_reset();
printf("Testing Subfiling VFD functionality\n");
printf("SKIPPED - Subfiling VFD not built\n");
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
#endif /* H5_HAVE_SUBFILING_VFD */

View File

@ -509,7 +509,7 @@ indentation(unsigned x)
}
else {
fprintf(rawerrorstream, "error: the indentation exceeds the number of cols.\n");
HDexit(1);
exit(1);
}
}

View File

@ -63,7 +63,7 @@ leave(int ret)
free(str_flag);
h5tools_close();
HDexit(ret);
exit(ret);
}
/*-------------------------------------------------------------------------

View File

@ -124,5 +124,5 @@ h5diff_exit(int status)
{
h5tools_close();
HDexit(status);
exit(status);
}

View File

@ -303,5 +303,5 @@ h5diff_exit(int status)
/* Always exit(0), since MPI implementations do weird stuff when they
* receive a non-zero exit value. - QAK
*/
HDexit(status);
exit(status);
}

View File

@ -159,7 +159,7 @@ leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
}
/*-------------------------------------------------------------------------

View File

@ -178,7 +178,7 @@ leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
} /* leave() */
/*-------------------------------------------------------------------------

View File

@ -106,7 +106,7 @@ main(int argc, char *argv[])
if (argv[1] && (HDstrcmp("-V", argv[1]) == 0)) {
print_version(PROGRAMNAME);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
/*
@ -168,7 +168,7 @@ main(int argc, char *argv[])
case 6: /* -h found; help, then exit */
help(argv[0]);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
break;
case 7: /* -d found; look for dimensions */

View File

@ -89,7 +89,7 @@ leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
}
/*-------------------------------------------------------------------------
@ -395,7 +395,7 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi
res = HDfstat(infid, &sbuf);
if (res < 0) {
error_msg("Can't stat file \n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
howmuch = (ssize_t)sbuf.st_size;
@ -432,12 +432,12 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi
if (nchars <= 0) {
error_msg("Read error \n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
if (HDwrite(outfid, buf, (unsigned)nchars) < 0) {
error_msg("Write error \n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
tot += nchars;

View File

@ -156,7 +156,7 @@ static void
leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
}
/*-------------------------------------------------------------------------

View File

@ -2630,7 +2630,7 @@ leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
}
/*-------------------------------------------------------------------------

View File

@ -1306,7 +1306,7 @@ parse_command_line(int argc, const char *const *argv)
}
else {
fprintf(stderr, "pio_perf: invalid --api option %s\n", buf);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (*end == '\0')
@ -1354,7 +1354,7 @@ parse_command_line(int argc, const char *const *argv)
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
if (!isdigit(buf[j])) {
fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
pio_debug_level = atoi(buf);
@ -1380,7 +1380,7 @@ parse_command_line(int argc, const char *const *argv)
break;
default:
fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
@ -1524,7 +1524,7 @@ parse_size_directive(const char *size)
break;
default:
fprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}

View File

@ -873,7 +873,7 @@ parse_command_line(int argc, const char *const *argv)
}
else {
fprintf(stderr, "sio_perf: invalid --api option %s\n", buf);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (*end == '\0')
@ -937,7 +937,7 @@ parse_command_line(int argc, const char *const *argv)
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
if (!HDisdigit(buf[j])) {
fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
sio_debug_level = atoi(buf);
@ -963,7 +963,7 @@ parse_command_line(int argc, const char *const *argv)
break;
default:
fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
@ -1035,7 +1035,7 @@ parse_command_line(int argc, const char *const *argv)
}
else {
fprintf(stderr, "sio_perf: invalid --api option %s\n", H5_optarg);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
break;
case 'w':
@ -1199,7 +1199,7 @@ parse_size_directive(const char *size)
default:
fprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}

View File

@ -371,7 +371,7 @@ static void
leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
}
/*-------------------------------------------------------------------------

View File

@ -200,7 +200,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* already chunk info inserted for this one; exit */
if (table->objs[i].chunk.rank > 0) {
H5TOOLS_INFO("chunk information already inserted for <%s>\n", obj_list[j].obj);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* insert the layout info */
else {

View File

@ -105,7 +105,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("input Error: Invalid compression type in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* get filter additional parameters */
@ -136,7 +136,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("compression parameter not digit in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (l == -1)
stype[m] = c;
@ -152,7 +152,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_values[j++] = H5_SZIP_EC_OPTION_MASK;
else {
error_msg("szip mask must be 'NN' or 'EC' \n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
}
@ -186,7 +186,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("compression parameter is not a digit in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (l == -1)
stype[m] = c;
@ -202,7 +202,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_values[j++] = H5Z_SO_FLOAT_DSCALE;
else {
error_msg("scale type must be 'IN' or 'DS' \n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
}
@ -246,13 +246,13 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("filter number parameter is not a digit in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
else if (!HDisdigit(c) && f == -1) {
if (obj_list)
free(obj_list);
error_msg("filter flag parameter is not a digit in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
stype[q] = c;
} /* for u */
@ -271,7 +271,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("compression parameter is not a digit in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
stype[m] = c;
} /* u */
@ -314,7 +314,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
@ -329,7 +329,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
@ -344,7 +344,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("extra parameter in SHUF <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -358,7 +358,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("extra parameter in FLET <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -372,7 +372,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("extra parameter in NBIT <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -386,7 +386,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -399,14 +399,14 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("incorrect number of compression parameters in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
else {
if (obj_list)
free(obj_list);
error_msg("invalid filter type in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
break;
}
@ -427,7 +427,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("invalid compression parameter in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
break;
/*-------------------------------------------------------------------------
@ -440,19 +440,19 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (obj_list)
free(obj_list);
error_msg("pixels_per_block is not even in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (pixels_per_block > H5_SZIP_MAX_PIXELS_PER_BLOCK) {
if (obj_list)
free(obj_list);
error_msg("pixels_per_block is too large in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if ((HDstrcmp(smask, "NN") != 0) && (HDstrcmp(smask, "EC") != 0)) {
if (obj_list)
free(obj_list);
error_msg("szip mask must be 'NN' or 'EC' \n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
break;
default:
@ -543,7 +543,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
if (obj_list)
free(obj_list);
error_msg("in parse layout, no characters after : in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* get layout info */
@ -558,7 +558,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
pack->layout = H5D_CHUNKED;
else {
error_msg("in parse layout, not a valid layout in <%s>\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
else {
@ -577,7 +577,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
if (obj_list)
free(obj_list);
error_msg("in parse layout, <%s> Chunk dimensions missing\n", str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
for (i = j, c_index = 0; i < len; i++) {
@ -589,7 +589,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
if (obj_list)
free(obj_list);
error_msg("in parse layout, <%s> Not a valid character in <%s>\n", sdim, str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (c == 'x' || i == len - 1) {
@ -601,7 +601,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
if (obj_list)
free(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n", sdim, str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
c_index++;
}
@ -617,7 +617,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
if (obj_list)
free(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n", sdim, str);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
pack->chunk.rank = c_index + 1;
}

View File

@ -192,7 +192,7 @@ static void
leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
}
/*-------------------------------------------------------------------------

View File

@ -189,7 +189,7 @@ static void
leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
} /* leave() */
/*-------------------------------------------------------------------------

View File

@ -69,7 +69,7 @@ leave(int ret)
error_msg("Could not close file access property list\n");
h5tools_close();
HDexit(ret);
exit(ret);
} /* end leave() */
/*-------------------------------------------------------------------------

View File

@ -65,7 +65,7 @@ usage(const char *progname)
"'k' for kB.\n");
fprintf(stderr, "File family names include an integer printf "
"format such as '%%d'\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/*-------------------------------------------------------------------------
@ -204,7 +204,7 @@ main(int argc, char *argv[])
else if (!HDstrcmp(argv[argno], "-V")) {
printf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR,
H5_VERS_RELEASE);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
}
else if (!HDstrcmp(argv[argno], "-family_to_sec2")) {
family_to_single = TRUE;
@ -227,9 +227,9 @@ main(int argc, char *argv[])
/* allocate names */
if (NULL == (src_name = (char *)calloc((size_t)NAMELEN, sizeof(char))))
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
if (NULL == (dst_name = (char *)calloc((size_t)NAMELEN, sizeof(char))))
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
/*
* Get the name for the source file and open the first member. The size
@ -243,12 +243,12 @@ main(int argc, char *argv[])
if ((src = HDopen(src_name, O_RDONLY)) < 0) {
HDperror(src_name);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
HDperror("fstat");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
if (verbose)
@ -265,7 +265,7 @@ main(int argc, char *argv[])
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
HDperror(dst_name);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (verbose)
fprintf(stderr, "> %s\n", dst_name);
@ -295,11 +295,11 @@ main(int argc, char *argv[])
n = (size_t)MIN((off_t)n, src_act_size - src_offset);
if ((nio = HDread(src, buf, n)) < 0) {
HDperror("read");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
fprintf(stderr, "%s: short read\n", src_name);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
for (i = 0; i < n; i++) {
if (buf[i])
@ -321,15 +321,15 @@ main(int argc, char *argv[])
if (need_write) {
if (need_seek && HDlseek(dst, dst_offset, SEEK_SET) < 0) {
HDperror("HDlseek");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if ((nio = HDwrite(dst, buf, n)) < 0) {
HDperror("write");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
fprintf(stderr, "%s: short write\n", dst_name);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
need_seek = FALSE;
}
@ -359,11 +359,11 @@ main(int argc, char *argv[])
}
else if (src < 0) {
HDperror(src_name);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
HDperror("fstat");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
src_act_size = sb.st_size;
if (src_act_size > src_size) {
@ -384,26 +384,26 @@ main(int argc, char *argv[])
if (0 == dst_membno) {
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
HDperror("HDHDlseek");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
HDperror("read");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
HDperror("write");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
HDclose(dst);
HDsnprintf(dst_name, NAMELEN, dst_gen_name, ++dst_membno);
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
HDperror(dst_name);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
dst_offset = 0;
need_seek = FALSE;
@ -420,19 +420,19 @@ main(int argc, char *argv[])
if (need_seek) {
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
HDperror("read");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
HDperror("write");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
HDclose(dst);
@ -441,7 +441,7 @@ main(int argc, char *argv[])
* These private properties are for this tool only. */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
HDperror("H5Pcreate");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (family_to_single) {
@ -451,7 +451,7 @@ main(int argc, char *argv[])
*/
if (H5Pset(fapl, H5F_ACS_FAMILY_TO_SINGLE_NAME, &family_to_single) < 0) {
HDperror("H5Pset");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
else {
@ -460,14 +460,14 @@ main(int argc, char *argv[])
* This private property is for this tool only. */
if (H5Pset_fapl_family(fapl, H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) {
HDperror("H5Pset_fapl_family");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Set the property of the new member size as hsize_t */
hdsize = (hsize_t)dst_size;
if (H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
HDperror("H5Pset");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}
@ -488,13 +488,13 @@ main(int argc, char *argv[])
if (file >= 0) {
if (H5Fclose(file) < 0) {
HDperror("H5Fclose");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
} /* end if */
if (H5Pclose(fapl) < 0) {
HDperror("H5Pclose");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Free resources and return */

View File

@ -51,7 +51,7 @@ main(int argc, char *argv[])
/* h5fc_chk_idx fname dname */
if (argc != 3) {
usage();
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Duplicate the file name & dataset name */
@ -61,39 +61,39 @@ main(int argc, char *argv[])
/* Try opening the file */
if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
fprintf(stderr, "h5fc_chk_idx: unable to open the file\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Open the dataset */
if ((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0) {
fprintf(stderr, "h5fc_chk_idx: unable to open the dataset\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Get the dataset's chunk indexing type */
if (H5Dget_chunk_index_type(did, &idx_type) < 0) {
fprintf(stderr, "h5fc_chk_idx: unable to get chunk index type for the dataset\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Close the dataset */
if (H5Dclose(did) < 0) {
fprintf(stderr, "h5fc_chk_idx: unable to close the dataset\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Close the file */
if (H5Fclose(fid) < 0) {
fprintf(stderr, "h5fc_chk_idx_type: cannot close the file\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
/* Return success when the chunk indexing type is version 1 B-tree */
if (idx_type == H5D_CHUNK_IDX_BTREE)
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
else {
fprintf(stderr, "Error: chunk indexing type is %d\n", idx_type);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
} /* main() */

View File

@ -64,14 +64,14 @@ parse_command_line(int argc, const char *const *argv)
case '?':
default:
usage(h5tools_getprogname());
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end switch */
} /* end while */
if (argc <= H5_optind) {
error_msg("missing file name\n");
usage(h5tools_getprogname());
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end if */
} /* end parse_command_line() */

View File

@ -85,7 +85,7 @@ static void
leave(int ret)
{
h5tools_close();
HDexit(ret);
exit(ret);
}
/*-------------------------------------------------------------------------

View File

@ -45,7 +45,7 @@ main(int argc, char *argv[])
/* Check the # of arguments */
if (argc != 2) {
usage();
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Get the file name */
@ -55,16 +55,16 @@ main(int argc, char *argv[])
if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
fprintf(stderr, "clear_open_chk: unable to open the file\n");
free(fname);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
free(fname);
/* Close the file */
if (H5Fclose(fid) < 0) {
fprintf(stderr, "clear_open_chk: cannot close the file\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Return success */
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* main() */

View File

@ -600,10 +600,10 @@ main(void)
fflush(stderr);
/* Not going through library closing by calling _exit(0) with success */
HD_exit(0);
_exit(0);
error:
/* Exit with failure */
HD_exit(1);
_exit(1);
}

View File

@ -38,11 +38,11 @@ main(void)
/* Set up data array */
if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) {
HDperror("calloc");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data)))) {
HDperror("calloc");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
for (i = 0; i < FAMILY_NUMBER; i++)
buf[i] = buf_data + (i * FAMILY_SIZE);
@ -50,28 +50,28 @@ main(void)
/* Set property list and file name for FAMILY driver */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
HDperror("H5Pcreate");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) {
HDperror("H5Pset_fapl_family");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if ((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
HDperror("H5Fcreate");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/* Create and write dataset */
if ((space = H5Screate_simple(2, dims, NULL)) < 0) {
HDperror("H5Screate_simple");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if ((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
HDperror("H5Dcreate2");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
for (i = 0; i < FAMILY_NUMBER; i++)
@ -80,27 +80,27 @@ main(void)
if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0) {
HDperror("H5Dwrite");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (H5Sclose(space) < 0) {
HDperror("H5Sclose");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (H5Dclose(dset) < 0) {
HDperror("H5Dclose");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (H5Pclose(fapl) < 0) {
HDperror("H5Pclose");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (H5Fclose(file) < 0) {
HDperror("H5Fclose");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
free(buf);

View File

@ -142,10 +142,10 @@ main(void)
if (nerrors)
goto error;
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
error:
nerrors = MAX(1, nerrors);
printf("***** %d FAMILY FILE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
} /* end main() */

View File

@ -90,7 +90,7 @@ error(const char *fmt, ...)
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
fprintf(stderr, "\n");
va_end(ap);
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
/*

View File

@ -569,7 +569,7 @@ handle_requests(struct server_run *run)
}
HDclose(connfd);
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end if writer side of fork */
else { /* parent process (server side of fork) */
mirror_log(run->loginfo, V_INFO, "tidying up from handshake");
@ -614,7 +614,7 @@ main(int argc, char **argv)
run = init_server_run(argc, argv);
if (NULL == run) {
mirror_log(NULL, V_ERR, "can't initialize run");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (handle_requests(run) < 0) {
@ -623,10 +623,10 @@ main(int argc, char **argv)
if (term_server_run(run) < 0) {
mirror_log(NULL, V_ERR, "problem closing server run");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
HDexit(EXIT_SUCCESS);
exit(EXIT_SUCCESS);
} /* end main() */
#else /* H5_HAVE_MIRROR_VFD */
@ -635,7 +635,7 @@ int
main(void)
{
printf("Mirror VFD was not built -- cannot launch server.\n");
HDexit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
#endif /* H5_HAVE_MIRROR_VFD */

Some files were not shown because too many files have changed in this diff Show More