Re: Syslog problems

2011-07-28 Thread Davide Brini
On Wed, 27 Jul 2011 20:37:06 +0200, Dario Minnucci 
wrote:

> 
> Hi Davide,
> 
> On 07/27/2011 04:55 PM, 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:
> > 
> 
> 
> BTW, it was fixed under mon 1.2.0-2 as stated under Debian BTS #611751 [0]
> 
> So, consider update mon to 1.2.0-2

Well, apparently Ubuntu 11.04 doesn't have it (yet?).

http://packages.ubuntu.com/natty/mon

But I'm ok with my manual fix for now. I might open a bug in the Ubuntu
tracker. Thanks for all the answers.

-- 
D.

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: Syslog problems

2011-07-27 Thread Jim Trocki

On Wed, 27 Jul 2011, Allan Wind wrote:



Debian fixed this with Bug#611751 I believe.  Surprised if that
did not make it upstream.



It's in the CVS HEAD, has been for a while, which is newer than mon-1.2.0.
Time for a 1.2.1 I guess.

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: Syslog problems

2011-07-27 Thread Dario Minnucci

Hi Davide,

On 07/27/2011 04:55 PM, 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:
> 


BTW, it was fixed under mon 1.2.0-2 as stated under Debian BTS #611751 [0]

So, consider update mon to 1.2.0-2

Regards,


[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611751


-- 
 Dario Minnucci 
 Phone: +34 902884117 | Fax: +34 902024417 | Support: +34 80745
 Key fingerprint = BAA1 7AAF B21D 6567 D457  D67D A82F BB83 F3D5 7033




signature.asc
Description: OpenPGP digital signature
___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: Syslog problems

2011-07-27 Thread Dario Minnucci

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.
> 
> 
> /Allan


The 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 
 Phone: +34 902884117 | Fax: +34 902024417 | Support: +34 80745
 Key fingerprint = BAA1 7AAF B21D 6567 D457  D67D A82F BB83 F3D5 7033




signature.asc
Description: OpenPGP digital signature
___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: Syslog problems

2011-07-27 Thread Allan Wind
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.


/Allan
-- 
Allan Wind
Life Integrity, LLC


___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Syslog problems

2011-07-27 Thread Davide Brini
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);
   }
}

Regards,

-- 
D.

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon