diff options
author | gni/root@dev3-127.(none) <> | 2006-10-20 16:38:26 +0800 |
---|---|---|
committer | gni/root@dev3-127.(none) <> | 2006-10-20 16:38:26 +0800 |
commit | 39336ce2a110e7e799169e6166953cfd109f8fa4 (patch) | |
tree | a7b4926ecd1b2674128de7f83b9f980dc3a7bbe2 | |
parent | 8646e145b4030cb47d70fa78e3ff53cca1140e0b (diff) | |
parent | ab01dd733ff879d595abe641081cae10b7dc3837 (diff) | |
download | mariadb-git-39336ce2a110e7e799169e6166953cfd109f8fa4.tar.gz |
Merge dev3-127.(none):/mnt/mysql/home/ngb/mysql-5.1/mysql-5.1-new-ndb-bj
into dev3-127.(none):/mnt/mysql/home/ngb/mysql-5.1/mysql-5.1-bug21858
-rw-r--r-- | storage/ndb/src/common/util/File.cpp | 16 |
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; } |