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

Function os_execute

third-party/lua-5.2.4/src/loslib.c:80–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80static int os_execute (lua_State *L) {
81 const char *cmd = luaL_optstring(L, 1, NULL);
82 int stat = system(cmd);
83 if (cmd != NULL)
84 return luaL_execresult(L, stat);
85 else {
86 lua_pushboolean(L, stat); /* true if there is a shell */
87 return 1;
88 }
89}
90
91
92static int os_remove (lua_State *L) {

Callers

nothing calls this directly

Calls 2

luaL_execresultFunction · 0.70
lua_pushbooleanFunction · 0.70

Tested by

no test coverage detected