lua-users home
lua-l archive

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

On Fri, Mar 14, 2014 at 03:48:40PM +0400, Dio Darkclainer wrote:
> Hi all!
> In stand-alone lua interpreter:
> a = {__gc = function() print'exit' end}
> setmetatable(a,a)
> os.exit()

By default, os.exit() assumes the OS will clean up any allocated
resources.  See the manual for how to change this:

(5.2 and newer only; in earlier verions there is no way to override
this, IIRC)