[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amavis-user
Subject:    Re: [AMaViS-user] logging of perl runtime errors when daemonized
From:       Mark Martinec <Mark.Martinec+amavis () ijs ! si>
Date:       2007-03-06 10:49:02
Message-ID: 200703061149.02445.Mark.Martinec+amavis () ijs ! si
[Download RAW message or body]

> Makes sense, looks fine, accepted, thanks.

Actually, it is not so good, warnings should not be converted to die.
I'm trying the following now:

if ($daemonize) {
  # propagate signal when called from an eval, log otherwise
  $SIG{'__DIE__' } =
    sub { $^S && die @_; do_log(0,"_DIE: %s", join(' ',@_)) };
  $SIG{'__WARN__'} =
    sub { do_log(2,"_WARN: %s", join(' ',@_)) }
}


Mark

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic