libuv/src/unix
Michael Neumann 8b90faff6c fs: fix bug in sendfile for DragonFly
The code made an implicit assumption that the 'len` variable passed
to the sendfile(2) syscall is not modified by the operating system
in case of an error other than EAGAIN or EINTR.

The man page leaves this unspecified on FreeBSD, DragonFly and
Darwin, so better check the error code which returns a valid
value in `len` explicitly (only EAGAIN and EINTR).

This fixes the test case for sendfile on DragonFly.

PR-URL: https://github.com/libuv/libuv/pull/466
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-01 09:22:43 +02:00
..
aix.c aix: fix uv_exepath with relative paths 2015-07-30 23:31:36 +02:00
android-ifaddrs.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
async.c unix: fix for uv_async data race 2015-02-18 21:44:37 +01:00
atomic-ops.h unix: add atomic-ops.h 2013-10-20 13:58:34 +02:00
core.c unix: allow nbufs > IOV_MAX in uv_fs_{read,write} 2015-08-04 11:31:04 +02:00
darwin-proctitle.c unix: fix long line introduced in commit 94e628fa 2015-01-21 13:04:50 +01:00
darwin.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
dl.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
freebsd.c freebsd: obtain true uptime through clock_gettime() 2015-08-31 10:05:48 +02:00
fs.c fs: fix bug in sendfile for DragonFly 2015-09-01 09:22:43 +02:00
fsevents.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
getaddrinfo.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
getnameinfo.c unix, win: add synchronous uv_get{addr,name}info 2015-01-23 01:12:05 +01:00
internal.h Revert "stream: squelch ECONNRESET error if already closed" 2015-08-07 14:19:08 +02:00
kqueue.c Revert "stream: squelch ECONNRESET error if already closed" 2015-08-07 14:19:08 +02:00
linux-core.c Revert "stream: squelch ECONNRESET error if already closed" 2015-08-07 14:19:08 +02:00
linux-inotify.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
linux-syscalls.c linux: intercept syscall when running under memory sanitizer 2015-05-05 10:26:20 +02:00
linux-syscalls.h Revert "stream: squelch ECONNRESET error if already closed" 2015-08-07 14:19:08 +02:00
loop-watcher.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
loop.c unix, win: make uv_loop_init return on error 2015-08-20 17:39:21 +02:00
netbsd.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
openbsd.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
pipe.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
poll.c Revert "stream: squelch ECONNRESET error if already closed" 2015-08-07 14:19:08 +02:00
process.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
proctitle.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
pthread-fixes.c android: add missing include to pthread-fixes.c 2015-07-15 10:18:52 +02:00
signal.c unix: fix various memory leaks and undef behavior 2013-12-07 02:29:43 +04:00
spinlock.h unix: add spinlock.h 2013-10-20 13:58:34 +02:00
stream.c stream: retry write on EPROTOTYPE on OSX 2015-08-19 09:25:41 +02:00
sunos.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
tcp.c unix: consolidate tcp and udp bind error 2015-06-28 11:53:52 +02:00
thread.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
timer.c unix, windows: don't allow a NULL callback on timers 2014-09-05 16:59:18 +02:00
tty.c tty: cleanup handle if uv_tty_init fails 2015-06-30 01:25:53 +02:00
udp.c unix: OpenBSD's setsockopt needs an unsigned char for multicast 2015-08-10 09:27:53 +02:00