On Mon, May 13, 2002 at 10:41:45AM -0400, Theo Van Dinter wrote:
> On Mon, May 13, 2002 at 10:26:01AM -0400, Michael Stenner wrote:
> > I've tracked the problem down pretty far. If syslog-ng is restarted
> > after a Sys::Syslog::connect(), and then &syslog() is called, the
> > process will die with "Broken Pipe".
> >
> > It does not appear that this can be caught. I tried wrapping it in an
> > eval {} and it still killed the process.
> >
> > I'm also not sure where it's coming from. I grepped through
> > /usr/bin/perl and all modules, manpages and included libraries that I
> > could find, looking for "Broken Pipe".
>
> Well, "broken pipe" is really the process receiving a SIGPIPE. So a
> possible solution would be something like:
>
> my $old = $SIG{'PIPE'};
> $SIG{'PIPE'} = sub { closelog; openlog ... ; }
>
> do logging;
>
> $SIG{'PIPE'} = $old;
>
>
> around the logging areas. That way the signal will be trapped when
> appropriate and handled.
If you guys think that's a reasonable solution, then I'm game. Unless
I hear otherwise, I'll whip something up that does that.
-Michael
--
Michael Stenner Office Phone: 919-660-2513
Duke University, Dept. of Physics [EMAIL PROTECTED]
Box 90305, Durham N.C. 27708-0305
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk