--- loncom/lonsql 2004/05/03 16:20:57 1.58
+++ loncom/lonsql 2004/05/11 20:03:05 1.59
@@ -3,7 +3,7 @@
# The LearningOnline Network
# lonsql - LON TCP-MySQL-Server Daemon for handling database requests.
#
-# $Id: lonsql,v 1.58 2004/05/03 16:20:57 matthew Exp $
+# $Id: lonsql,v 1.59 2004/05/11 20:03:05 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -282,7 +282,7 @@ my $execdir=$perlvar{'lonDaemons'};
open (PIDSAVE,">$execdir/logs/lonsql.pid");
print PIDSAVE "$$\n";
close(PIDSAVE);
-&logthis("CRITICAL: ---------- Starting ----------");
+&logthis("CRITICAL: ---------- Starting ----------");
#
# Ignore signals generated during initial startup
@@ -353,7 +353,7 @@ sub make_new_child {
$perlvar{'lonSqlAccess'},
{ RaiseError =>0,PrintError=>0})) {
sleep(10+int(rand(20)));
- &logthis("WARNING: Couldn't connect to database".
+ &logthis("WARNING: Couldn't connect to database".
": $@");
# "($st secs): $@");
print "database handle error\n";
@@ -421,7 +421,7 @@ sub make_new_child {
#
# close the database handle
$dbh->disconnect
- or &logthis("WARNING: Couldn't disconnect".
+ or &logthis("WARNING: Couldn't disconnect".
" from database $DBI::errstr : $@");
# this exit is VERY important, otherwise the child will become
# a producer of more and more children, forking yourself into
@@ -476,7 +476,7 @@ sub do_sql_query {
#prepare and execute the query
my $sth = $dbh->prepare($query);
unless ($sth->execute()) {
- &logthis(''.
+ &logthis(''.
'WARNING: Could not retrieve from database:'.
$sth->errstr().'');
} else {
@@ -910,7 +910,7 @@ sub HUNTSMAN { # si
kill 'INT' => keys %children;
my $execdir=$perlvar{'lonDaemons'};
unlink("$execdir/logs/lonsql.pid");
- &logthis("CRITICAL: Shutting down");
+ &logthis("CRITICAL: Shutting down");
$unixsock = "mysqlsock";
my $port="$perlvar{'lonSockDir'}/$unixsock";
unlink($port);
@@ -921,7 +921,7 @@ sub HUPSMAN { # sig
local($SIG{CHLD}) = 'IGNORE'; # we're going to kill our children
kill 'INT' => keys %children;
close($server); # free up socket
- &logthis("CRITICAL: Restarting");
+ &logthis("CRITICAL: Restarting");
my $execdir=$perlvar{'lonDaemons'};
$unixsock = "mysqlsock";
my $port="$perlvar{'lonSockDir'}/$unixsock";
@@ -931,7 +931,7 @@ sub HUPSMAN { # sig
sub DISCONNECT {
$dbh->disconnect or
- &logthis("WARNING: Couldn't disconnect from database ".
+ &logthis("WARNING: Couldn't disconnect from database ".
" $DBI::errstr : $@");
exit;
}