| 78 | |
| 79 | |
| 80 | static 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 | |
| 92 | static int os_remove (lua_State *L) { |
nothing calls this directly
no test coverage detected