# (2) Converted checks to new plugin mechanism (Stephen Johnson May 28, 1999)
# Added user-configurable escalation mechanism
#
-# $Id: spong-network.pl,v 1.42 2002/06/10 20:33:09 sljohnson Exp $
+# $Id: spong-network.pl,v 1.43 2002/06/10 20:34:58 sljohnson Exp $
use Carp;
use lib "@@LIBDIR@@";
eval {
local $SIG{'ALRM'} = sub { die "Socket timed out"; };
+ local $SIG{'__DIE__'} = sub { alarm(0); }; # Reset the alarm when dead
alarm($timeout);
socket( SOCK, PF_INET, SOCK_STREAM, $proto ) || die "socket: $!";