-
-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes checks for system(), which is C89/90 #782
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,6 @@ print_stats(const char *prefix, | |
static void | ||
synchronize(void) | ||
{ | ||
#ifdef H5_HAVE_SYSTEM | ||
#if defined(H5_HAVE_WIN32_API) && !defined(__CYGWIN__) | ||
_flushall(); | ||
#else | ||
|
@@ -107,7 +106,6 @@ synchronize(void) | |
status = HDsystem("df >/dev/null"); | ||
HDassert(status >= 0); | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unclear why we're not using sync(2) here instead of system("sync"). Also unclear what the df hack is supposed to be doing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ancient testcode - not certain either, except that a system sync will flush data from all processes. |
||
#endif | ||
} | ||
|
||
/*------------------------------------------------------------------------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I'm aware, this only flushes FILE objects, so it's not the same as POSIX's sync(2) and is probably the wrong thing to do here. FlushFileBuffers() would be better, but that requires the file's HANDLE.