Calling Flow.write with more than IOV_MAX buffers results in EINVAL. This can happen when e.g. using Buf_write to write a lot of data without flushing.
Implementations of Flow.write with such limits should just truncate the list of buffers. Possibly Buf_write should also know the limit and flush before sending so many (or just use a low enough limit that it work on all platforms).
Calling
Flow.write
with more thanIOV_MAX
buffers results inEINVAL
. This can happen when e.g. usingBuf_write
to write a lot of data without flushing.Reported by @Cjen1 (see https://github.com/Cjen1/prototyping-testing/tree/master/eio-pipe).
Implementations of
Flow.write
with such limits should just truncate the list of buffers. PossiblyBuf_write
should also know the limit and flush before sending so many (or just use a low enough limit that it work on all platforms).On Linux, https://github.com/ocaml-multicore/ocaml-uring/pull/76 can be used to get the limit.