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

Function os_exit

third-party/lua-5.3.5/src/loslib.c:373–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371
372
373static int os_exit (lua_State *L) {
374 int status;
375 if (lua_isboolean(L, 1))
376 status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE);
377 else
378 status = (int)luaL_optinteger(L, 1, EXIT_SUCCESS);
379 if (lua_toboolean(L, 2))
380 lua_close(L);
381 if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */
382 return 0;
383}
384
385
386static 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