an update...
instead of requiring a new handler function, you can in fact simply add:
which tells it to use the "default" handling.
instead of requiring a new handler function, you can in fact simply add:
signal(SIGPIPE, SIG_DFLT);
which tells it to use the "default" handling.