| 21 | |
| 22 | |
| 23 | static int os_pushresult (lua_State *L, int i, const char *filename) { |
| 24 | int en = errno; /* calls to Lua API may change this value */ |
| 25 | if (i) { |
| 26 | lua_pushboolean(L, 1); |
| 27 | return 1; |
| 28 | } |
| 29 | else { |
| 30 | lua_pushnil(L); |
| 31 | lua_pushfstring(L, "%s: %s", filename, strerror(en)); |
| 32 | lua_pushinteger(L, en); |
| 33 | return 3; |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | |
| 38 | static int os_execute (lua_State *L) { |
no test coverage detected