diff options
author | Jeremy Allison <jra@samba.org> | 2010-12-14 17:35:29 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-12-15 03:26:43 +0100 |
commit | 12e49a748c26697fb6f697512babb949a6c2931f (patch) | |
tree | ef11a635112abe228b8eb53706fa736104cee440 /source3 | |
parent | a8eed184a0f9e5fdeec9a40d8ffbc2f3d56beb74 (diff) | |
download | samba-12e49a748c26697fb6f697512babb949a6c2931f.tar.gz samba-12e49a748c26697fb6f697512babb949a6c2931f.tar.bz2 samba-12e49a748c26697fb6f697512babb949a6c2931f.zip |
Protect the onefs sendfile from EAGAIN/EWOULDBLOCK.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Dec 15 03:26:43 CET 2010 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/onefs_system.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c index 33bec2658b..94b5da2a9e 100644 --- a/source3/modules/onefs_system.c +++ b/source3/modules/onefs_system.c @@ -269,7 +269,11 @@ static ssize_t onefs_sys_do_sendfile(int tofd, int fromfd, do { ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, flags); - } while (ret == -1 && errno == EINTR); +#if defined(EWOULDBLOCK) + } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)); +#else + } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); +#endif /* On error we're done. */ if (ret == -1) { |