| 127 | |
| 128 | |
| 129 | static 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 | |
| 141 | static int os_remove(lua_State *L) { |
nothing calls this directly
no test coverage detected