Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
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