Subject: | closelog() appears to not do so |
Maybe I'm just misunderstanding how it should work, but the following code:
-----------------------
use warnings;
use strict;
use Sys::Syslog qw(:standard :macros);
my $ourname = "foodaemon";
openlog($ourname, 'ndelay,pid,perror', 'daemon') or die "Error opening
syslog";
syslog(LOG_ERR, "This should go to stderr and syslog");
closelog() or die "Error closing syslog";
openlog($ourname, 'ndelay,pid', 'daemon') or die "Error opening syslog";
syslog(LOG_ERR, "This should only go to syslog");
-----------------------
Prints both messages to stderr (expected: only the first one).
This is perl 5, version 14, subversion 1 (v5.14.1) built for
x86_64-linux-thread-multi
Thanks for any help.