MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / os_exit

Function os_exit

third-party/lua-5.5.0/src/loslib.c:396–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394
395
396static int os_exit (lua_State *L) {
397 int status;
398 if (lua_isboolean(L, 1))
399 status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE);
400 else
401 status = (int)luaL_optinteger(L, 1, EXIT_SUCCESS);
402 if (lua_toboolean(L, 2))
403 lua_close(L);
404 if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */
405 return 0;
406}
407
408
409static const luaL_Reg syslib[] = {

Callers

nothing calls this directly

Calls 3

lua_tobooleanFunction · 0.70
luaL_optintegerFunction · 0.70
lua_closeFunction · 0.70

Tested by

no test coverage detected