From: dms Date: Mon, 18 Dec 2000 13:40:42 +0000 (+0000) Subject: debug to restart X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f4b07ebbb5f0eac747e6454f12eb039cf0bcddc8;p=infobot.git debug to restart git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@210 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/core.pl b/src/core.pl index d2027aa..5b23398 100644 --- a/src/core.pl +++ b/src/core.pl @@ -26,6 +26,7 @@ use vars qw(@joinchan @ircServers @wingateBad @wingateNow @wingateCache use vars qw(%count %netsplit %netsplitservers %flood %dcc %orig %nuh %talkWho %seen %floodwarn %param %dbh %ircPort %userList %jointime %topic %joinverb %moduleAge %last %time %mask %file + %forked %pid %fork ); # Signals. @@ -60,6 +61,8 @@ sub doExit { } elsif ($bot_pid == $$) { # parent. &status("parent caught SIG$sig (pid $$).") if (defined $sig); + &status("--- Start of quit."); + my $type; &closeDCC(); &closePID(); @@ -71,6 +74,7 @@ sub doExit { &dumpallvars() if (&IsParam("dumpvarsAtExit")); &closeLog(); &closeSQLDebug() if (&IsParam("SQLDebug")); + &status("--- QUIT."); } else { # child. &status("child caught SIG$sig (pid $$)."); } @@ -147,6 +151,7 @@ sub showProc { sub setup { &showProc(" (\&openLog before)"); &openLog(); # write, append. + &status("--- Started logging."); foreach ("debian") { my $dir = "$bot_base_dir/$_/"; @@ -238,6 +243,10 @@ sub shutdown { sub restart { my ($sig) = @_; + &DEBUG(" forked => ".scalar(keys %forked) ); + &DEBUG(" fork => ".scalar(keys %fork) ); + &DEBUG(" pid => ".scalar(keys %pid) ); + if ($$ == $bot_pid) { &status("--- $sig called.");