MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / io_popen

Function io_popen

Source/Misc/lua/src/lua.c:12088–12094  ·  view source on GitHub ↗

** this function has a separated environment, which defines the ** correct __close for 'popen' files */

Source from the content-addressed store, hash-verified

12086** correct __close for 'popen' files
12087*/
12088static int io_popen (lua_State *L) {
12089const char *filename = luaL_checkstring(L, 1);
12090const char *mode = luaL_optstring(L, 2, "r");
12091FILE **pf = newfile(L);
12092*pf = lua_popen(L, filename, mode);
12093return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
12094}
12095
12096
12097static int io_tmpfile (lua_State *L) {

Callers

nothing calls this directly

Calls 2

newfileFunction · 0.85
pushresultFunction · 0.85

Tested by

no test coverage detected