Skip Menu |

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

Report information
The Basics
Id: 33598
Status: open
Priority: 0/
Queue: Unix-Syslog

People
Owner: Nobody in particular
Requestors: bitcard93445 [...] rainslide.net
Cc:
AdminCc:

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



Subject: closelog sans openlog
The calling script exits with no message if you call closelog without having first called openlog: use Unix::Syslog qw( :subs ); print "before\n"; closelog; print "after\n"; It does not die, so you can't catch it in an eval. Using Perl 5.8.8 on CentOS 5.
Subject: Re: [rt.cpan.org #33598] closelog sans openlog
Date: Tue, 26 Feb 2008 20:33:13 +0100
To: bug-Unix-Syslog [...] rt.cpan.org
From: Marcus Harnisch <marcus.harnisch [...] gmx.net>
"fgssfgs via RT" <bug-Unix-Syslog@rt.cpan.org> writes: Show quoted text
> The calling script exits with no message if you call closelog without > having first called openlog: > > use Unix::Syslog qw( :subs ); > print "before\n"; > closelog; > print "after\n";
I call that a feature. It behaves exactly like the equivalent C code (let me know if it doesn't), which was the intention when writing Unix::Syslog. Show quoted text
> It does not die, so you can't catch it in an eval.
Sorry. But why would anyone care? Does it do any harm to call closelog() without an open syslog connection? Regards Marcus
Subject: Re: [rt.cpan.org #33598] closelog sans openlog
Date: Wed, 27 Feb 2008 16:54:09 +0000 (GMT)
To: Marcus Harnisch via RT <bug-Unix-Syslog [...] rt.cpan.org>
From: Paul <bitcard93445 [...] rainslide.net>
Hi Marcus, thanks for replying so quickly. Exiting perl in such a manner, or indeed in any program written in any language, without the program explicitly doing so itself, would be considered a critical bug. I am surprised to hear that this is what happens in C also. Surely, it would be considered a bug in C. I fail to see how it can be considered a feature in any regard. Show quoted text
>> It does not die, so you can't catch it in an eval.
> > Sorry. But why would anyone care? Does it do any harm to call > closelog() without an open syslog connection?
Well, I care, because it just happened for me. Apparently it does the most harm possible - program exits. If a function provided by any module might cause your program to quit, then we would have to put a trap around each call of the function. That would be fair enough if it were documented, I guess, but the fact that I can't even catch it in an eval is distressing. If you're still reluctant to fix this, might I suggest that you put a note about it on the CPAN page? -- .
Subject: Re: [rt.cpan.org #33598] closelog sans openlog
Date: Wed, 27 Feb 2008 21:19:21 +0100
To: bug-Unix-Syslog [...] rt.cpan.org
From: Marcus Harnisch <marcus.harnisch [...] gmx.net>
"fgssfgs via RT" <bug-Unix-Syslog@rt.cpan.org> writes: Show quoted text
> Exiting perl in such a manner, or indeed in any program written in any > language, without the program explicitly doing so itself, would be considered a > critical bug.
Oops. I guess I misunderstood what was happening. Are you saying that the closelog() call terminates the program? I'll look into that. If you have an idea why that might be happening, I'd be interested to hear about it. I've never had any complaints about that so far. Regards Marcus
Subject: Re: [rt.cpan.org #33598] closelog sans openlog
Date: Sun, 18 May 2008 21:40:44 +0200
To: bug-Unix-Syslog [...] rt.cpan.org
From: Marcus Harnisch <marcus.harnisch [...] gmx.net>
Sorry, it's been a while. Got bigger fish to fry over here. Please check out Unix-Syslog-1.1 and see if that works better for you. Regards Marcus