[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Return an exit code without os.exit()?
- From: Geoff Leyland <geoff_leyland@...>
- Date: Thu, 8 Oct 2009 00:01:23 +1300
luacov does a trick with gc and a temporary file to get its
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.