/* ** this function has a separated environment, which defines the ** correct __close for 'popen' files */ static int io_pclose(lua_State * L) { FILE **p = topfile(L); int ok = lua_pclose(L, *p); *p = NULL; return pushresult(L, ok, NULL); }
/* ** this function has a separated environment, which defines the ** correct __close for 'popen' files */ static int io_pclose (lua_State *L) { #if !USE_POPEN luaL_error(L, "`popen' not supported"); return 0; #else FILE **p = topfile(L); int ok = lua_pclose(L, *p); *p = NULL; return pushresult(L, ok, NULL); #endif }
/* ** function to close 'popen' files */ static int io_pclose(lua_State *L) { LStream *p = tolstream(L); return luaL_execresult(L, lua_pclose(L, p->f)); }
/* ** function to close 'popen' files */ static int io_pclose (lua_State *L) { int *p = tofilep(L); int ok = lua_pclose(L, *p); *p = FS_OPEN_OK - 1; return pushresult(L, ok, NULL); }