summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArvind Umrao <arvind.umrao@oracle.com>2012-08-23 16:15:04 +0530
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-08-24 23:22:36 -0700
commit3c534f72d6d4327926474a5f8fa53cbcf19de3cf (patch)
treea88353a2736fc4a8b5ba7b1a0d99f65d2230c769 /src
parent4b67ad5486c322c01a2ca86b0b4af0a74228f813 (diff)
If socket is interrupted with signal EINTR, re-attempt read.
If socket is getting interrupted with signal EINTR, we should keep socket in progress state. I have borrowed following code from socket write _fs_flush():line274 . I have done exactly same at _fs_fill(). Socket write will not close the connection and re attempt to read buffer. Signed-off-by: Arvind Umrao <arvind.umrao@oracle.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r--src/fc/fsio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fc/fsio.c b/src/fc/fsio.c
index 03a689f..4deab88 100644
--- a/src/fc/fsio.c
+++ b/src/fc/fsio.c
@@ -184,8 +184,11 @@ _fs_fill (FSFpePtr conn)
continue;
}
}
- _fs_connection_died (conn);
- return FSIO_ERROR;
+ if (!ECHECK(EINTR))
+ {
+ _fs_connection_died (conn);
+ return FSIO_ERROR;
+ }
}
}
return FSIO_READY;