On Tue, Aug 09, 2005 at 04:30:32PM -0700, eravin @ panix. com wrote:

>    connect: No such file or directory (SOCK_DGRAM after trying SOCK_STREAM)
> at perlprog line NNN
> 
> 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()
> call n the signal handler, it gets even worse - the program dies with
> no error message.  Here's what happens when I step through with the
> debugger:
> 
>    main::(/usr/local/sbin/servicemon:160):
>    160:    syslog("notice", "STARTUP: services= " . join("/", @services) . ",
>    startwait=$startwait, cyclewait=$cyclewait");
>      DB<1>
>    Debugged program terminated.  Use q to quit or R to restart,
>      use O inhibit_exit to avoid stopping after program termination,
>      h q, h R or h O to get additional info.
> 
> Any suggestions?

I've checked the source for Syslog.pm in 5.6.1 and it's calling croak()
If you wrap the call to syslog() in an eval, you will catch the error.

As to what happens if you remove the call to syslog - given that your
source line says "SHUTDOWN", is your program shutting down normally in this
case? Otherwise I have no idea.

> [Please do not change anything below this line]
> -----------------------------------------------------------------
> ---
> Flags:
>     category=core
>     severity=medium
> ---
> Site configuration information for perl v5.8.0:
> 
> Configured by fn at Mon Jul 29 16:55:09 EDT 2002.
> 
> Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
>   Platform:
>     osname=netbsd, osvers=1.5.2, archname=i386-netbsd

I don't know how NetBSD versions work. Is this an older NetBSD with a newer
version of perl? (One that happens to have reasonable internet connectivity,
hence why you used it for bug reporting)

Nicholas Clark

Reply via email to