summaryrefslogtreecommitdiff
path: root/mysys/my_pread.c
diff options
context:
space:
mode:
authorunknown <tsmith/tim@siva.hindu.god>2006-09-14 23:20:13 -0600
committerunknown <tsmith/tim@siva.hindu.god>2006-09-14 23:20:13 -0600
commitac1a030e34aa4ca29cd93679541e2f9fbeb83382 (patch)
tree7e5caf8377fbd0f5505ff2bd40395415af23304f /mysys/my_pread.c
parentda5e2660b7ecea8b255f8b7e4f69c61d157918d7 (diff)
parentd7a1f97c15fc5adaaf3116b8fb9ee32783498165 (diff)
downloadmariadb-git-ac1a030e34aa4ca29cd93679541e2f9fbeb83382.tar.gz
Merge siva.hindu.god:/usr/home/tim/m/bk/tmp/40
into siva.hindu.god:/usr/home/tim/m/bk/tmp/41 mysys/my_lwrite.c: Auto merged mysys/my_pread.c: Auto merged mysys/my_read.c: Auto merged mysys/my_write.c: Auto merged
Diffstat (limited to 'mysys/my_pread.c')
-rw-r--r--mysys/my_pread.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index 3d02e368720..f378d548731 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -52,8 +52,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))
{
@@ -124,8 +128,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))