Skip Menu |

This queue is for tickets about the Sys-Syslog CPAN distribution.

Report information
The Basics
Id: 23882
Status: resolved
Priority: 0/
Queue: Sys-Syslog

People
Owner: Nobody in particular
Requestors: Phil.Hooper [...] Sun.COM
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: bug 21866 not your problem
Date: Mon, 11 Dec 2006 02:26:45 -0800
To: bugs-sys-syslog [...] rt.cpan.org
From: phil hooper <Phil.Hooper [...] Sun.COM>
hi, the problem is coming from a change in Net::Server/Server.pm to add "nofatal" to default log options bug 21265 has what looks like an incomplete solution in diff form. I'll send some info to that module's author. If you want to pass on to the guy who had the problem, he'll want to edit .../lib/perl5/site_perl/*/Net/Server.pm and: 1] change 'pid,nofatal' to 'pid|nofatal' at line 263 2] add |nofatal to the list of strings in line 264 thanks for the code! phil
Subject: Re: [rt.cpan.org #23882] bug 21866 not your problem
Date: Mon, 11 Dec 2006 15:29:56 +0100
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Phil Hooper wrote via RT: Show quoted text
> hi, > > the problem is coming from a change in Net::Server/Server.pm to add > "nofatal" to default log options > > bug 21265 has what looks like an incomplete solution in diff form. I'll > send some info to that module's author. If you want to pass on to the guy > who had the problem, > he'll want to edit .../lib/perl5/site_perl/*/Net/Server.pm and: > 1] change 'pid,nofatal' to 'pid|nofatal' at line 263
No need for such change: Sys::Syslog has always searched for its options as just being separated by word boundaries, so comma is as good as pipe. Show quoted text
> 2] add |nofatal to the list of strings in line 264
Also note that passing options that were unknown to previous versions of Sys::Syslog should not cause errors or even warnings when running with those old versions, given the way options were detected. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #23882] bug 21866 not your problem
Date: Mon, 11 Dec 2006 09:57:36 -0800
To: bug-Sys-Syslog [...] rt.cpan.org
From: phil hooper <Phil.Hooper [...] Sun.COM>
hi Sébastien, The problem is not really in your code. Here is the released Net::Server 0.94 code: my $opt = defined($prop->{syslog_logopt}) ? $prop->{syslog_logopt} : $Sys::Syslog::VERSION ge '0.15' ? 'pid,nofatal' : 'pid'; $prop->{syslog_logopt} = ($opt =~ /^((cons|ndelay|nowait|pid)($|\|))*/) ? $1 : 'pid'; ... if( ! Sys::Syslog::openlog($prop->{syslog_ident}, $prop->{syslog_logopt}, $prop->{syslog_facility}) ){ this produces an unitialized variable diagnostic when run in -w mode since $prop->{syslog_logopt} is undef. I think the correct code is: my $opt = defined($prop->{syslog_logopt}) ? $prop->{syslog_logopt} : $Sys::Syslog::VERSION ge '0.15' ? 'pid|nofatal' : 'pid'; $prop->{syslog_logopt} = ($opt =~ /^((cons|ndelay|nowait|pid|nofatal)($|\|))*/) ? $1 : 'pid'; the unreleased change to openlog to do this: $logopt ||=''; shuts up the warning, but the log option [pid,nofatal] that Net::Server intends are probably not being set by default then. in any case, running unmodified postgrey 1.27 with the 0.94 version of Net::Server coughs up a warning which could be eliminated by changes to postgrey (set syslog_logopt there), Net::Server::Server.pm, or Sys::Syslog, but the right place for the fix appears to be Net::Server. phil Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=23882 > > > Phil Hooper wrote via RT: > >
>> hi, >> >> the problem is coming from a change in Net::Server/Server.pm to add >> "nofatal" to default log options >> >> bug 21265 has what looks like an incomplete solution in diff form. I'll >> send some info to that module's author. If you want to pass on to the guy >> who had the problem, >> he'll want to edit .../lib/perl5/site_perl/*/Net/Server.pm and: >> 1] change 'pid,nofatal' to 'pid|nofatal' at line 263 >>
> > No need for such change: Sys::Syslog has always searched for its options > as just being separated by word boundaries, so comma is as good as pipe. > >
>> 2] add |nofatal to the list of strings in line 264 >>
> > Also note that passing options that were unknown to previous versions of > Sys::Syslog should not cause errors or even warnings when running with > those old versions, given the way options were detected. > > -- > Sébastien Aperghis-Tramoni > > Close the world, txEn eht nepO. > >
From: Phil.Hooper [...] Sun.COM
I should read the code completely while not comparing lagavulin and laphroaig.... patch to Net::Server in bugid 21265 works fine, while the stuff I posted below doesn't. In non-patch form, the line 264 should read: $prop->{syslog_logopt} = ($opt =~ /^(((cons|ndelay|nowait|pid|nofatal),*)*$)/) ? $1 : 'pid'; suggest you reject this bug report and 21866 to get them off the table. sorry about that, phil