Use exit, not die.
This commit is contained in:
1 parent
78ed4d39c3
commit
f2472322d1
1 file changed
+14
-1
@@ -174,7 +174,7 @@ foreach my $cskey (keys %cservers) {
|
|||||||
my $data = readline($SOCKET{$cskey});
|
my $data = readline($SOCKET{$cskey});
|
||||||
# Lost connection: kill process.
|
# Lost connection: kill process.
|
||||||
unless (defined $data) {
|
unless (defined $data) {
|
||||||
die;
|
exit;
|
||||||
}
|
}
|
||||||
# Get rid of the newlines.
|
# Get rid of the newlines.
|
||||||
chomp $data;
|
chomp $data;
|
||||||
@@ -201,6 +201,7 @@ else {
|
|||||||
}
|
}
|
||||||
undef $it;
|
undef $it;
|
||||||
|
|
||||||
|
println "mk" and mod_load("m_hw");
|
||||||
|
|
||||||
# Keep Auto alive.
|
# Keep Auto alive.
|
||||||
while (1) { sleep 1; }
|
while (1) { sleep 1; }
|
||||||
@@ -223,3 +224,15 @@ sub socksnd
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Load a module.
|
||||||
|
sub mod_load {
|
||||||
|
my ($module) = @_;
|
||||||
|
|
||||||
|
if (-e "$Bin/../modules/".lc($module).".pm") {
|
||||||
|
do "$Bin/../modules/".lc($module).".pm" and return 1 or print $@ and return 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user