From 733167dc1516d0e5836c169b55c4dd9daf4ba368 Mon Sep 17 00:00:00 2001 From: Camiel Dobbelaar Date: Tue, 12 Dec 2006 07:28:42 +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(-) 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