diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-09-14 23:23:48 -0600 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-09-14 23:23:48 -0600 |
commit | 82c6098f7b3d790c5afb0415b4b9eec7ff231226 (patch) | |
tree | ac603f051e757cb02fdbab7bc5147d921216a188 /mysys/my_pread.c | |
parent | 549c922bdb151d767b29186c404f5a8a540152a0 (diff) | |
parent | 06ef603c0974d045fd173380b5e2caae92cd4d38 (diff) | |
download | mariadb-git-82c6098f7b3d790c5afb0415b4b9eec7ff231226.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/tmp/50
into siva.hindu.god:/usr/home/tim/m/bk/tmp/51
mysys/my_pread.c:
Auto merged
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)) |