KOReader is in itself a big lua script.
It provides a way to execute your own on demand if you write a plugin.
It also provides hooks that get called automatically and are useful to write your own user patches.
Both patches and plugins are executed on the same vm as ko does, so issuing os.exit it isn't going to exit your script but the whole program.
|