in reply to Re^2: Problems with DBI::trace_msg
in thread Problems with DBI::trace_msg
the problem I'm seeing is that the fork'd part of the program keeps starting over and over
Obviously, you're starting more children than are terminating. So, in order to debug the issue, I would write a little my_exit() routine, which you then call everywhere you're now calling the exit builtin. The my_exit() routine would log somewhere which process died, and then exit. In its most simple form something like
sub my_exit { my $from_where = shift; if (open my $log, ">>", "/tmp/mailscanner-debug.log") { print $log "$$ exited: $from_where\n"; close $log; } exit; }
so you can verify that the processes are actually terminating as expected (e.g. when the bind fails, etc.).
You might want to refine that routine as necessary, and also write similar entries (to the same logfile) whenever a new process is being created. Or generally add more debug logging... to get a clearer picture of what's going on. (You could maybe use MailScanner::Log::InfoLog() instead of using an extra logfile. Not sure though if that would work properly — haven't looked at how it's implemented...)
Also, what exactly is your ExitLogging() doing?
|
|---|