Possible fix for problem noted below -
--- Syslog.pm 2006-01-10 17:42:01.000000000 -0700
+++ ./blib/lib/Sys/Syslog.pm 2006-01-27 10:03:11.000000000 -0700
@@ -42,6 +42,7 @@
my $current_proto = undef;
my $failed = undef;
my $fail_time = undef;
+my $lo_ndelay = undef;
our ($connected, @fallbackMethods, $syslog_send, $host);
use Socket ':all';
@@ -534,7 +535,7 @@
sub openlog {
our ($ident, $logopt, $facility) = @_; # package vars
our $lo_pid = $logopt =~ /\bpid\b/;
- our $lo_ndelay = $logopt =~ /\bndelay\b/;
+ $lo_ndelay = $logopt =~ /\bndelay\b/;
our $lo_nowait = $logopt =~ /\bnowait\b/;
return 1 unless $lo_ndelay;
&connect;
@@ -798,6 +799,7 @@
$current_proto = $proto;
my($old) = select(SYSLOG); $| = 1; select($old);
} else {
+ return(undef) if($lo_ndelay);
@fallbackMethods = ();
croak join "\n\t- ", "no connection to syslog available", @errs
}
Show quoted text> -----Original Message-----
> From: Bugs in Sys-Syslog via RT [mailto:bug-Sys-Syslog@rt.cpan.org]
> Sent: Friday, January 27, 2006 9:30 AM
> To: ric@Opus1.COM
> Subject: [rt.cpan.org #17316] AutoReply: openlog() croak()s
> if daemon is down instead of returning error to caller
>
>
>
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
> "openlog() croak()s if daemon is down instead of
> returning error to caller",
> a summary of which appears below.
>
> There is no need to reply to this message right now. Your
> ticket has been
> assigned an ID of [rt.cpan.org #17316].
>
> Please include the string:
>
> [rt.cpan.org #17316]
>
> in the subject line of all future correspondence about this
> issue. To do so,
> you may reply to this message.
>
> Thank you,
> bug-Sys-Syslog@rt.cpan.org
>
> --------------------------------------------------------------
> -----------
> openlog("watcher","pid,ndelay","mail")
> croak()s if no syslog daemon is available. It would be much more
> useful if openlog() returned undef to the caller, so the application
> could use alternative error reporting. As it is, the error that was
> going to be logged is lost, and the application is aborted with
> unix dgram connect: Connection refused at daemon_watch.prl line 668
> no connection to syslog available at daemon_watch.prl line 668
>
> This is with perl, v5.8.6 built for i486-linux under Slackware Linux
> 10.1.
> --
>