At 18:57 on 11/04/2002 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> atexit is not an alternative, because we might have multiple > interpreters to clean up like in t/op/interp_2. So the issue here is that on_exit can take a parameter to be passed into the handler function, right? We could implement our own version of on_exit that registered the handlers/ arguments in a linked list or something, and have a single atexit() handler call them on our behalf. However, that still assumes we have atexit() everywhere. This appears to not be true on SunOS at least- apparently it has on_exit, though. But, it seems like we can make this work everywhere if we move to using a platform.c Parrot_on_exit() and Parrot_exit() rather than any kind of native on_exit/atexit/exit functions. Then we can make them all DTRT everywhere, I think... either with our without atexit(). If this (Parrot_exit/Parrot_on_exit) is a reasonable way to do things, I can probably come up with a patch later this week, if nobody else jumps on it ;-) --Josh