summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/ndb/src/common/util/File.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/storage/ndb/src/common/util/File.cpp b/storage/ndb/src/common/util/File.cpp
index 056b7ff199b..6776f736d16 100644
--- a/storage/ndb/src/common/util/File.cpp
+++ b/storage/ndb/src/common/util/File.cpp
@@ -123,12 +123,24 @@ bool
File_class::close()
{
bool rc = true;
+ int retval = 0;
+
if (m_file != NULL)
{
::fflush(m_file);
- rc = (::fclose(m_file) == 0 ? true : false);
- m_file = NULL; // Try again?
+ retval = ::fclose(m_file);
+ while ( (retval != 0) && (errno == EINTR) ){
+ retval = ::fclose(m_file);
+ }
+ if( retval == 0){
+ rc = true;
+ }
+ else {
+ rc = false;
+ ndbout_c("ERROR: Close file error in File.cpp for %s",strerror(errno));
+ }
}
+ m_file = NULL;
return rc;
}