avoid partial writes on IO.vmsplice unless F_NONBLOCK
commitc9b42fb857f77109d215a0418fd3171f0f5d5b18
authorEric Wong <normalperson@yhbt.net>
Thu, 27 May 2010 08:08:56 +0000 (27 08:08 +0000)
committerEric Wong <normalperson@yhbt.net>
Thu, 27 May 2010 08:53:51 +0000 (27 08:53 +0000)
tree15e31a55487266f1a06fc961f3d52c1ee254f87d
parentbde5844909cd61ecfa3393fba4e9884c083f2fa8
avoid partial writes on IO.vmsplice unless F_NONBLOCK

vmsplice-ing a partial array of strings into a pipe is not very
useful under Ruby, so wait for I/O availability if the pipe is
full.  This code/logic was also contributed to the io-extra
gem (by me) for the IO.writev implementation.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
ext/io_splice/io_splice_ext.c
test/test_io_splice.rb