diff options
author | Camiel Dobbelaar <camield@cvs.openbsd.org> | 2006-12-12 07:28:42 +0000 |
---|---|---|
committer | Camiel Dobbelaar <camield@cvs.openbsd.org> | 2006-12-12 07:28:42 +0000 |
commit | 733167dc1516d0e5836c169b55c4dd9daf4ba368 (patch) | |
tree | 3f0b9e8eb5599973dc35ab9236b610be5dfd3473 | |
parent | acbbfbd5ec4162f072b610c1bce0ecd3035abf7c (diff) |
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@
-rw-r--r-- | usr.sbin/ftp-proxy/ftp-proxy.c | 3 |
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); |