diff options
author | tsmith/tim@siva.hindu.god <> | 2006-09-14 23:23:48 -0600 |
---|---|---|
committer | tsmith/tim@siva.hindu.god <> | 2006-09-14 23:23:48 -0600 |
commit | d2e030cae355437e9a53a04a272c1afdcb9315e2 (patch) | |
tree | ac603f051e757cb02fdbab7bc5147d921216a188 /mysys/my_pread.c | |
parent | ee6275c503584b6286a07a79572785d291040a52 (diff) | |
parent | fb6625e4952b073e0153e2776a52d0c28fa205da (diff) | |
download | mariadb-git-d2e030cae355437e9a53a04a272c1afdcb9315e2.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/tmp/50
into siva.hindu.god:/usr/home/tim/m/bk/tmp/51
Diffstat (limited to 'mysys/my_pread.c')
-rw-r--r-- | mysys/my_pread.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mysys/my_pread.c b/mysys/my_pread.c index 978366e57e5..45a4a363c0a 100644 --- a/mysys/my_pread.c +++ b/mysys/my_pread.c @@ -75,8 +75,12 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset, DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d", readbytes,Count,Filedes,my_errno)); #ifdef THREAD - if (readbytes == 0 && errno == EINTR) - continue; /* Interrupted */ + if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR) + { + DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d", + (int) readbytes)); + continue; /* Interrupted */ + } #endif if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { @@ -170,8 +174,8 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset, VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC)); continue; } - if ((writenbytes == 0 && my_errno == EINTR) || - (writenbytes > 0 && (uint) writenbytes != (uint) -1)) + if ((writenbytes > 0 && (uint) writenbytes != (uint) -1) || + my_errno == EINTR) continue; /* Retry */ #endif if (MyFlags & (MY_NABP | MY_FNABP)) |