xapi-project / vhd-tool

Command-line tools for streaming and manipulating vhd format data
Other
8 stars 26 forks source link

[WiP] CA-309302: ensure we do not get EAGAIN from _sendfile #87

Closed edwintorok closed 5 years ago

edwintorok commented 5 years ago

Looks like the fix for CA-295097 was not enough. By reading source code of Lwt I noticed that ch.blocking is a lazy value, and it is only forced by wrap_syscall (implicitly called by the other Lwt_unix IO functions). Do the same for our direct copy/sendfile wrapper, call wrap_syscall to ensure blocking mode is updated if needed.

This still needs testing, which we'll get to later today, opened PR to see if you have some thoughts on this.

/cc @TimSmithCtx