From 6ba63af2a174afc64d26997f5d1d48e609427d98 Mon Sep 17 00:00:00 2001 From: camield Date: Tue, 12 Dec 2006 07:28:41 +0000 Subject: 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@ --- usr.sbin/ftp-proxy/ftp-proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ftp-proxy') 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, @@ -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); -- cgit v1.2.3-59-g8ed1b