system.exit

Synopsis

local system = require "system"
system.exit([code: integer = 0 [, opts: table]])

Description

Exit the VM. Other VMs in the process are not stopped.

Parameters

code

If caller is the main VM, code is used as the application exit code.

opts

If caller is the main VM, then opts is a table that accepts the following options:

force: 0|1|2|"abort" = 0
0

Nothing.

1

Not implemented yet.

2

Exit the process forcefully (little to none cleanup steps are performed).

"abort"

Exit the process even more forcefully (equivalent to the C function abort()).