From 015a920638da3f28704ba09d08a992683fa11044 Mon Sep 17 00:00:00 2001
From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Mon, 18 Dec 2000 13:40:42 +0000
Subject: [PATCH] debug to restart

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@210 c11ca15a-4712-0410-83d8-924469b57eb5
---
 blootbot/src/core.pl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/blootbot/src/core.pl b/blootbot/src/core.pl
index d2027aa..5b23398 100644
--- a/blootbot/src/core.pl
+++ b/blootbot/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.");
 
-- 
2.39.5