dup2 STD*_FILE instead close to avoid SIGPIPE under linux
Merge pull request #27 from dccmx/master

dup2 STD*_FILE instead close to avoid SIGPIPE under linux