kylelaker / altcat

Cat using sendfile and splice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

altcat

An implementation of cat that uses splice and sendfile to write to stdout. In situations where stdout is piped, splice is used; in all other cases, sendfile is used. The combination of these calls avoids unnecessary copying to userspace.

One unfortunate side effect is that

altcat FILE >> OUT

is not supported as neither splice nor sendfile support appending to files.

About

Cat using sendfile and splice

License:MIT License


Languages

Language:C 94.3%Language:Makefile 5.7%