summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index 0ed7df38..a54d67f7 100644
--- a/main.c
+++ b/main.c
@@ -839,10 +839,13 @@ int main(int argc,char *argv[])
}
signal(SIGINT,SIGNAL_CAST sig_int);
- signal(SIGPIPE,SIGNAL_CAST sig_int);
signal(SIGHUP,SIGNAL_CAST sig_int);
signal(SIGTERM,SIGNAL_CAST sig_int);
+ /* Ignore SIGPIPE; we consistently check error codes and will
+ * see the EPIPE. */
+ signal(SIGPIPE, SIG_IGN);
+
/* Initialize push_dir here because on some old systems getcwd
(implemented by forking "pwd" and reading its output) doesn't
work when there are other child processes. Also, on all systems