** this function has a separated environment, which defines the ** correct __close for 'popen' files */
| 12086 | ** correct __close for 'popen' files |
| 12087 | */ |
| 12088 | static int io_popen (lua_State *L) { |
| 12089 | const char *filename = luaL_checkstring(L, 1); |
| 12090 | const char *mode = luaL_optstring(L, 2, "r"); |
| 12091 | FILE **pf = newfile(L); |
| 12092 | *pf = lua_popen(L, filename, mode); |
| 12093 | return (*pf == NULL) ? pushresult(L, 0, filename) : 1; |
| 12094 | } |
| 12095 | |
| 12096 | |
| 12097 | static int io_tmpfile (lua_State *L) { |
nothing calls this directly
no test coverage detected