elwarren has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use warnings; use strict; use Net::DNS; use Net::DNS::Nameserver; sub replyhandler { 1 } sub gotint { my $sig = shift; die "die because I caught: SIG<$sig>\n"; } #$SIG{'INT'} = \&gotint; my $ns = Net::DNS::Nameserver->new( LocalAddr => '127.0.0.1', ReplyHan +dler => \&replyhandler); $ns->main_loop; while ( 1 ) { sleep 1 } END { print "oh no this is the END\n" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cleaning up after CTRL-C when using Net::DNS::Nameserver on Windows?
by jfroebe (Parson) on Jan 03, 2005 at 21:42 UTC | |
by elwarren (Priest) on Jan 04, 2005 at 20:12 UTC | |
|
Re: Cleaning up after CTRL-C when using Net::DNS::Nameserver on Windows?
by sgifford (Prior) on Jan 04, 2005 at 03:00 UTC |