Add signal handler which ignores SIGPIPE