Please sign in to comment.
unix: reset errno when using sendfile emulation
A common way to check if a uv_fs_t request failed is to check that req->errorno != 0. With uv_fs_sendfile(), when the sendfile() syscall fails, req->errorno is set to (for example) ENOTSOCK, even when the emulation code path succeeds. Zero errno before the call to uv__fs_sendfile_emul() to prevent that from happening.
- Loading branch information...