Open Arcterus opened 6 years ago
Depending on how far back we need to support we could use copy_file_range()
for things as well (it doesn’t require one of the file descriptors to be a pipe, but it requires Linux 4.5).
It sounds like fs::copy()
may already do this, so we might want to investigate a little more before deciding to add this.
On Linux, we should try to use
splice()
rather than the standard read/write stuff for operations involving pipes. This mostly affectssh
.