MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / os_execute

Function os_execute

lib/lua/src/loslib.c:142–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141
142static int os_execute (lua_State *L) {
143 const char *cmd = luaL_optstring(L, 1, NULL);
144 int stat;
145 errno = 0;
146 stat = l_system(cmd);
147 if (cmd != NULL)
148 return luaL_execresult(L, stat);
149 else {
150 lua_pushboolean(L, stat); /* true if there is a shell */
151 return 1;
152 }
153}
154
155
156static 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