lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


luacov does a trick with gc and a temporary file to get its save_stats
called 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.