-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sys::Syslog::syslog kills program if syslogd not running #8060
Comments
From eravin@panix.comCreated by eravin@panix.comOn our NetBSD 2.0 boxes with perl 5.6.1, we use Sys::Syslog this way: use strict; openlog $progname, "cons,pid", "daemon" || But when we send messages with syslog(), the program dies if syslogd connect: No such file or directory (SOCK_DGRAM after trying SOCK_STREAM) Where the offending line is something like: syslog("notice", "SHUTDOWN: $sig"); The offending line is in a signal handler. If I edit out the syslog() main::(/usr/local/sbin/servicemon:160): Any suggestions? Perl Info
|
From @nwc10On Tue, Aug 09, 2005 at 04:30:32PM -0700, eravin @ panix. com wrote:
I've checked the source for Syslog.pm in 5.6.1 and it's calling croak() As to what happens if you remove the call to syslog - given that your
I don't know how NetBSD versions work. Is this an older NetBSD with a newer Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From eravin@panix.comOn Wed, Aug 10, 2005 at 01:32:04AM -0700, Nicholas Clark via RT wrote:
I did that in one script to work around the problem, but I've got a lot I submit that this is a design bug - no other syslog() library behaves
That's just a side note - my point was that you only get an error message
Sorry, I'm using a NetBSD 2.0 machine whose default version of Perl was -- Ed |
From @nwc10On Wed, Aug 10, 2005 at 12:21:49PM -0400, Ed Ravin wrote:
One way of implementing in error return in perl is throwing an exception. We may not agree whether this is the most appropriate design paradigm in Nicholas Clark |
From eravin@panix.comOn Thu, Aug 11, 2005 at 01:52:35AM -0700, Nicholas Clark via RT wrote:
In that case, we have a documentation bug - the fact that Sys::Syslog might Would you accept patches for a "nocroak" or "nofatal" option to be used -- Ed |
@rgs - Status changed from 'open' to 'resolved' |
From @rgsEd Ravin wrote:
I applied the following to bleadperl : Change 25342 by rgs@bloom on 2005/08/31 15:14:28 Document that Sys::Syslog::openlog might die. Affected files ... ... //depot/perl/ext/Sys/Syslog/Syslog.pm#29 edit Differences ... ==== //depot/perl/ext/Sys/Syslog/Syslog.pm#29 (text) ==== @@ -53,13 +53,15 @@ =item openlog $ident, $logopt, $facility +Opens the syslog. B<You should use openlog() before calling syslog().> |
From eravin@panix.comOn Wed, Aug 31, 2005 at 08:42:04AM -0700, Rafael Garcia-Suarez via RT wrote:
It looks like no action was taken. I think at the very least, the behavior |
From eravin@panix.comOn Wed, Aug 31, 2005 at 09:01:57AM -0700, Rafael Garcia-Suarez via RT wrote:
Thanks! |
Migrated from rt.perl.org#36848 (status was 'resolved')
Searchable as RT36848$
The text was updated successfully, but these errors were encountered: