Rewrote copyfd to use library functions, terminate, and copy correct data.
3 files changed