Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8491) Re: Freeciv commit: kauf: A new connect dial
Home

[Freeciv-Dev] Re: (PR#8491) Re: Freeciv commit: kauf: A new connect dial

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8491) Re: Freeciv commit: kauf: A new connect dialog for the client. This allo...
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 Apr 2004 09:39:42 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8491 >

Raimar Falke wrote:

>>I think there's no problem with internal atexit() handlers.  These 
>>generally just free memory or something.
> 
> I disagree. Freeing memory which is assumed to be valid
> everytime/everywhere in the client is a problem. You also have to
> problem that the atexit handlers are called twice (newborn child and
> normal client). So can you guarantee that nothing bad happend if
> rl_callback_handler_remove, TTF_Quit or SDL_Quit is called twice?

Those aren't internal.

>>>So _exit is used. But _exit isn't the best choice since C99 contains
>>>_Exit with the same semantics (don't call atexit handlers).
>>
>> From "man _exit":
>>
>>CONFORMING TO
>>        SVr4, SVID, POSIX, X/OPEN, BSD 4.3.  The function  _Exit()  was 
>>  intro-
>>        duced by C99.
>>
>>so _exit() should be safe enough.  If any systems have problems we can 
>>switch to _Exit or add configure checks.
>>
>>Note that we don't blindly use C99 features anywhere.  We always have 
>>configure checks for them (some of these configure checks fail outright 
>>if the feature isn't present, however).
> 
> 
> So someone (me?) has to write a test for _Exit and use _exit if this
> fails?!

I think using _exit is fine for now.

jason




[Prev in Thread] Current Thread [Next in Thread]