|
luacov does a trick with gc and a temporary file to get its save_statscalled on exit:...This doesn't seem to happen on os.exit() - I guess os.exit() forces shutdown without gc?This will be addressed in Lua 5.2: os.exit will have an option to close the state (thus calling gc).
Thanks. Can I gently propose that the return value from the top-level script gets turned into an exit code? As you'll see from my message to Jerome, I don't know to turn a return value into an exit code in the general case, but I'm happy to stick to 0 and 1.