Showing results for 
Search instead for 
Did you mean: - abnormal end

Igor I. Shulz
Frequent Advisor - abnormal end

Hello, world

I have perl-script (perl 5.8.1), that works as dettached (daemonized) process under Mandrake 9.2. In fact it is some kind of tcp-server for some service. As server it writes log to syslog thru

It works fine without interruption day by day but sometime it dies with message:

Modification of a read-only value attempted at /usr/lib/perl5/5.8.1/i386-linux-thread-multi/Sys/ line 302.

Why??? This is source of

sub syslog {
local($priority) = shift;
local($mask) = shift;
local($message, $whoami);
local(@words, $num, $numpri, $numfac, $sum);
local($facility) = $facility; # may need to change temporarily.
$whoami .= "[$$]" if $lo_pid;

$mask =~ s/%m/$!/g;
$mask .= "\n" unless $mask =~ /\n$/;
$message = sprintf ($mask, @_);

Line 302 is : $message = sprintf ($mask, @_);

What is the problem? Why $message became read-only value?

Thank you