diff options
author | gni/root@dev3-127.(none) <> | 2006-10-08 11:38:20 +0800 |
---|---|---|
committer | gni/root@dev3-127.(none) <> | 2006-10-08 11:38:20 +0800 |
commit | c1703bbc1615d3fdac3d318ef8e9449960776838 (patch) | |
tree | e80949688aca48c2f1be73a333ab0e5df2b6e301 /ndb | |
parent | eb94d025815bf473d45e7ce078f281948258fa71 (diff) | |
parent | 259990d70468e29074f86248aef1b38704a67630 (diff) | |
download | mariadb-git-c1703bbc1615d3fdac3d318ef8e9449960776838.tar.gz |
Merge dev3-127.(none):/mnt/mysql/home/ngb/mysql-4.1/mysql-4.1-ndb-bj
into dev3-127.(none):/mnt/mysql/home/ngb/mysql-4.1/mysql-4.1-bug21858
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/common/util/File.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp index 12626f29e7d..00741d3a576 100644 --- a/ndb/src/common/util/File.cpp +++ b/ndb/src/common/util/File.cpp @@ -123,13 +123,25 @@ 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; } |