unix: Reset errno when using sendfile emulation #670

wants to merge 1 commit into from

2 participants

Joyent member

Here is a case I ran into while testing uv_cancel and fs operations: when a fs request is cancelled req->result will not be set and thus it will have the initial value, that is, 0. So, (please correct me if I'm wrong), the proper way to see if a request failed would be to see if req->errorno is != 0.

Then, when sendfile is used, if it fails but the emulation succeeds req->errorno will be set to ENOTSOCK for example, even if the request succeeded.

/cc @bnoordhuis


Thanks Saúl, landed in 9614d51.

Saúl, on a completely unrelated note: can I ask you to git config --global user.name so I don't have to git commit --amend --author="..." your patches?

@bnoordhuis bnoordhuis closed this Dec 28, 2012
Joyent member

Thanks Ben, I'll change my global git username, no problem :-)

@saghul saghul deleted the unknown repository branch Sep 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment