ignore SIGPIPE in ans.pl; this is needed for debian.

This commit is contained in:
Evan Hunt
2011-03-18 04:40:08 +00:00
parent f84aeac068
commit b6f5bf959e
+7 -1
View File
@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: ans.pl,v 1.2.6.3 2011/03/05 23:51:01 tbox Exp $
# $Id: ans.pl,v 1.2.6.4 2011/03/18 04:40:08 each Exp $
#
# This is the name server from hell. It provides canned
@@ -70,6 +70,12 @@ use Net::DNS;
use Net::DNS::Packet;
use strict;
# Ignore SIGPIPE so we won't fail if peer closes a TCP socket early
local $SIG{PIPE} = 'IGNORE';
# Flush logged output after every line
local $| = 1;
# We default to listening on 10.53.0.2 for historical reasons
# XXX: we should also be able to specify IPv6
my $server_addr = "10.53.0.2";