<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39501 >
On 05/09/07, Per I. Mathisen wrote:
> On Tue, 4 Sep 2007, Marko Lindqvist wrote:
> > On 07/08/07, Marko Lindqvist wrote:
> >> This adds SIGABRT handler to server.
> > ...
> >> displays BUG_URL after assert.
> > This version avoids infinite loop if freelog() is asserting.
> No, please do not replace assert()'s abort() with exit(). This means gdb
> will not work as expected. Also, how will such a handler work with the
> continue statements in gdb?
This handler is called by abort(), not instead of it. Still, it is
better practice to execute also handler we replace (to be just wrapper
around it). I already have updated patch for that.
This causes no problems with my version of gdb, nor can I see
problems with alternative gdb implementations.
Another thing is that signal() behavior differs between platforms.
sigaction() provides more consistent behavior, but is not available in
so many platforms. We should use sigaction() where possible, and
signal() only as fallback. I plan to do that change before doing
anything to SIGABRT.
Freeciv-dev mailing list