summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-11-29 14:32:03 +0000
committerfukachan <fukachan>2003-11-29 14:32:03 +0000
commit5d87ec7123d4ec3d040d63436274107beeaa488e (patch)
tree4b7eb7da57dd9d09d72541de37de30c3f30869c1
parent916b090a06281954666d5dbefc04dec0a2ab49c2 (diff)
downloadfml8-5d87ec7123d4ec3d040d63436274107beeaa488e.tar.gz
fml8-5d87ec7123d4ec3d040d63436274107beeaa488e.tar.bz2
fml8-5d87ec7123d4ec3d040d63436274107beeaa488e.zip
defined() check of log_message_queue
-rw-r--r--fml/lib/FML/Process/Kernel.pm20
1 files changed, 16 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index 0a602ca7..31d01590 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Kernel.pm,v 1.194 2003/11/29 10:24:29 fukachan Exp $
+# $FML: Kernel.pm,v 1.195 2003/11/29 11:08:04 fukachan Exp $
#
package FML::Process::Kernel;
@@ -1172,8 +1172,17 @@ sub _log_message_queue_append
{
my ($curproc, $msg) = @_;
my $msg_queue = $curproc->{ log_message_queue };
- $msg->{ time } = time;
- $msg_queue->add($msg);
+
+ if (defined $msg_queue) {
+ $msg->{ time } = time;
+ $msg_queue->add($msg);
+ }
+ else {
+ my $debug = $curproc->get_debug_level();
+ if ($debug > 1) {
+ print STDERR "msg: ", $msg->{ buf }, "\n";
+ }
+ }
}
@@ -1185,7 +1194,10 @@ sub _log_message_print
{
my ($curproc) = @_;
my $msg_queue = $curproc->{ log_message_queue };
- $msg_queue->print();
+
+ if (defined $msg_queue) {
+ $msg_queue->print();
+ }
}