Why is SIGPIPE putting this in a infinite loop? I don't understand...
what did I change?