diff options
| author | fukachan <fukachan> | 2003-11-29 14:32:03 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-11-29 14:32:03 +0000 |
| commit | 5d87ec7123d4ec3d040d63436274107beeaa488e (patch) | |
| tree | 4b7eb7da57dd9d09d72541de37de30c3f30869c1 /fml/lib/FML/Process | |
| parent | 916b090a06281954666d5dbefc04dec0a2ab49c2 (diff) | |
| download | fml8-5d87ec7123d4ec3d040d63436274107beeaa488e.tar.gz fml8-5d87ec7123d4ec3d040d63436274107beeaa488e.tar.bz2 fml8-5d87ec7123d4ec3d040d63436274107beeaa488e.zip | |
defined() check of log_message_queue
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 20 |
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(); + } } |
