views:

68

answers:

1

Is there something like the sendfile-syscall that works with multiple target file descriptors (i.e. instead of copying from one FD to another FD, it could should copy to, say, 4 FDs)?

I know that when talking about asynchronous IO, this is known as gather/scatter, but I could not find anything in the Linux AIO documentation.

+1  A: 

I am not aware of anything. I think the closest you are going to get to this is, assuming you are dealing with pipes, is to fashion something out of tee(2), vmsplice(2) and splice(2).

Duck
Thanks, splice looks like the right thing, since I mainly care about preventing multiple kernel-to-userspace copies
pmf