Linux splice() returning EINVAL (“Invalid argument”)
I'm trying to experiment with using splice ( man 2 splice ) to copy data from a UDP socket directly to a file. Unfortunately the first call to splice() returns EINVAL. The man page states: EINVAL Target file system doesn't support splicing; target file is opened in append mode; neither of the descriptors refers to a pipe; or offset given for nonseekable device. However, I believe none of those conditions apply. I'm using Fedora 15 (kernel 2.6.40-4) so I believe splice() is supported on all filesystems. The target file should be irrelevant in the first call to splice, but for completeness I'm