summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ftp-proxy
diff options
context:
space:
mode:
authorcamield <camield@openbsd.org>2006-12-12 07:28:41 +0000
committercamield <camield@openbsd.org>2006-12-12 07:28:41 +0000
commit6ba63af2a174afc64d26997f5d1d48e609427d98 (patch)
treec690b3338b0bc91c59ed49cd61118170dfd8d2dd /usr.sbin/ftp-proxy
parentsync (diff)
downloadwireguard-openbsd-6ba63af2a174afc64d26997f5d1d48e609427d98.tar.xz
wireguard-openbsd-6ba63af2a174afc64d26997f5d1d48e609427d98.zip
Ignore sigpipe as libevent does not handle that for us. Confirmed by
provos. Fixes race condition where ftp-proxy would silently exit if a write was attempted on a socket that was closed by an RST. Should fix PR 5260. ok claudio@
Diffstat (limited to 'usr.sbin/ftp-proxy')
-rw-r--r--usr.sbin/ftp-proxy/ftp-proxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c
index 45b6b4dc642..7d2e0a79c93 100644
--- a/usr.sbin/ftp-proxy/ftp-proxy.c
+++ b/usr.sbin/ftp-proxy/ftp-proxy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp-proxy.c,v 1.10 2006/10/15 18:23:44 camield Exp $ */
+/* $OpenBSD: ftp-proxy.c,v 1.11 2006/12/12 07:28:41 camield Exp $ */
/*
* Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
@@ -744,6 +744,7 @@ main(int argc, char *argv[])
event_init();
/* Setup signal handler. */
+ signal(SIGPIPE, SIG_IGN);
signal_set(&ev_sighup, SIGHUP, handle_signal, NULL);
signal_set(&ev_sigint, SIGINT, handle_signal, NULL);
signal_set(&ev_sigterm, SIGTERM, handle_signal, NULL);