Hi list,
On 07/27/2011 07:38 PM, Allan Wind wrote:
> On 2011-07-27 16:55:29, Davide Brini wrote:
>> Hi, I'm using the stable mon-1.2.0-1 under Ubuntu 11.04 (Perl 5.10.1), and I
>> noticed that mon wasn't logging anything at all in syslog. Further
>> inspection revealed that the problem seems to be in the redefined syslog()
>> function:
>>
>> no warnings; # Redefining syslog
>> sub syslog {
>> eval {
>> local $SIG{"__DIE__"}= sub { };
>> my @log = map { s/\%//mg; } @_;
>> Sys::Syslog::syslog(@log);
>> }
>> }
>>
>> since $_ is aliased in a map {} block, when the function is passed constant
>> strings, the map {} on @_ fails with a "modification of a read-only value
>> attempted". However this is not apparent, not even in debug mode, since it
>> happens inside the eval{} block.
>>
>> Suggested change (for example):
>>
>> no warnings; # Redefining syslog
>> sub syslog {
>> eval {
>> local $SIG{"__DIE__"}= sub { };
>> my @log = @_;
>> s/\%//mg for (@log);
>> Sys::Syslog::syslog(@log);
>> }
>> }
>
> Debian fixed this with Bug#611751 I believe. Surprised if that
> did not make it upstream.
>
>
> /AllanThe issue was reported [0] and patch attached to be considered. I don't really know if was applied on upstream sources yet. Regards, [0] http://sourceforge.net/tracker/?func=detail&aid=3177976&group_id=170&atid=100170 -- Dario Minnucci <[email protected]> Phone: +34 902884117 | Fax: +34 902024417 | Support: +34 807450000 Key fingerprint = BAA1 7AAF B21D 6567 D457 D67D A82F BB83 F3D5 7033
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mon mailing list [email protected] http://linux.kernel.org/mailman/listinfo/mon
