On Sunday 09 October 2011 12:28:11 sip-router wrote:
In a syslog manual I found that it should be avoided
using syslog()
(function behind LOG define) in signal handlers. So I moved the exit
message before killing the children that may jump context in another
signal handler. Here is snippet from man page.
syslog_r() and the other reentrant functions should only be used where
reentrancy is required (for instance, in a signal handler). syslog()
being not reentrant, only syslog_r() should be used here. For more
information about reentrancy and signal handlers, see signal(3).
See if it works now.
Your patch seems to fix it. I've not seen any segfaults yet.
Thanks,
--
Alex Hermann