merge the code for SIGPIPE from Jay B