diff options
author | Martin Pool <mbp@samba.org> | 2002-02-18 20:06:57 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2002-02-18 20:06:57 +0000 |
commit | 34758d5c1565188352c6a58a9ae223e44db7e46d (patch) | |
tree | 40023b4c30210fae35e3b1905aa50c2beaddce78 | |
parent | befbfe61156f63a8dadaf0efaaae4bfbf435c00c (diff) | |
download | rsync-34758d5c1565188352c6a58a9ae223e44db7e46d.tar.gz rsync-34758d5c1565188352c6a58a9ae223e44db7e46d.tar.bz2 rsync-34758d5c1565188352c6a58a9ae223e44db7e46d.zip |
Ignore SIGPIPE and allow EPIPE to get through to the program so that
we don't get stuck in a recursive loop trying to report a broken pipe
across that same broken pipe. Debian bug #128632 (Colin Walters)
-rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |