MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / os_execute

Function os_execute

src/Chain/libraries/glua/loslib.cpp:129–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127
128
129static int os_execute(lua_State *L) {
130 const char *cmd = luaL_optstring(L, 1, nullptr);
131 int stat = system(cmd);
132 if (cmd != nullptr)
133 return luaL_execresult(L, stat);
134 else {
135 lua_pushboolean(L, stat); /* true if there is a shell */
136 return 1;
137 }
138}
139
140
141static int os_remove(lua_State *L) {

Callers

nothing calls this directly

Calls 2

luaL_execresultFunction · 0.85
lua_pushbooleanFunction · 0.85

Tested by

no test coverage detected