I'm writing a plugin that uses substantial third party code (open source of course). It's written with portability in mind and calls all OS functionality through a nice abstraction layer that's not too hard to implement using the RB plugin functions, except for one rather annoying exception: it expects to be able to call a function to terminate the program with a fatal error
Is there any way to exit a plugin without having to return from its main function? It doesn't look like it, from plugin_load's implementation. The third party code contains the main loop of the program, and I'm trying to avoid modifying the code any more than necessary: propagating the errors upward from the various places it calls os_fatal() would be a huge and difficult change..
Any ideas? I'm guessing rockbox can't longjmp()..