Use readv(2)/writev(2)

Simplify the stdio code by using writev(2) and readv(2).