os.exit()

Type Function
Library os.*
Return value none
Revision 2017.3060
Keywords exit, quit, exit app, quit app
See also os.execute()
native.requestExit()

Overview

Important

This is a low level Lua call that should not be used on any platform. Use native.requestExit() instead (other than on iOS which does not permit apps to terminate themselves).

Calls the C function exit(), with an optional code, to terminate the host program. The default value for code is the success code.

Syntax

os.exit( [ exit ] )
exit (optional)

Number. Optional parameter that returns the exit code to the OS.

Gotchas

This is not the API you are looking for. Use native.requestExit() instead.