diff options
author | unknown <serg@serg.mylan> | 2005-01-11 00:14:46 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-01-11 00:14:46 +0100 |
commit | 5e75c1fe36066b80336aa8cc168da07c06e7500c (patch) | |
tree | a1a3b3c5271193b389f4898d27e2a4d267bc1571 /mysys/my_sync.c | |
parent | e3c7697431c144215af2f752d5c23b5b06e29982 (diff) | |
download | mariadb-git-5e75c1fe36066b80336aa8cc168da07c06e7500c.tar.gz |
my_close(), my_sync(): retry if EINTR
mysys/my_open.c:
my_close(): retry if EINTR
mysys/my_sync.c:
fsync(): retry if EINTR
Diffstat (limited to 'mysys/my_sync.c')
-rw-r--r-- | mysys/my_sync.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mysys/my_sync.c b/mysys/my_sync.c index 317ca039346..bd372f03c87 100644 --- a/mysys/my_sync.c +++ b/mysys/my_sync.c @@ -40,15 +40,19 @@ int my_sync(File fd, myf my_flags) DBUG_ENTER("my_sync"); DBUG_PRINT("my",("Fd: %d my_flags: %d", fd, my_flags)); + do + { #if defined(HAVE_FDATASYNC) - res= fdatasync(fd); + res= fdatasync(fd); #elif defined(HAVE_FSYNC) - res=fsync(fd); + res= fsync(fd); #elif defined(__WIN__) res= _commit(fd); #else - res= 0; /* No sync (strange OS) */ + res= 0; /* No sync (strange OS) */ #endif + } while (res == -1 && errno == EINTR); + if (res) { if (!(my_errno= errno)) |