Subject: | connect_unix() breaks if setlogsock is called first |
Hi,
in Sys::Syslog 0.16, syslog() is failing with
no connection to syslog available
- _PATH_LOG not available in syslog.h at /home/niko/t.pl line 5
if setlogsock('unix') is called first.
Sample program:
#!/usr/bin/perl -w
use Sys::Syslog qw(:DEFAULT setlogsock);
setlogsock('unix');
openlog("test", 'pid', 'local0');
syslog('local0|info', "test");
This happens because the test at the beginning of connect_unix() isn't
prepared for the case where $syslog_path is already defined.
Proposed patch attached.
I have verified this on perl 5.8.8, on Debian GNU/Linux.
Cheers,
--
Niko Tyni
ntyni@iki.fi
Subject: | syslog-patch |
Message body not shown because it is not plain text.