File close should return the same as os.execute if the file was opened via popen. os.execute should return a tuple see manual for more information. http://www.lua.org/manual/5.2/manual.html#pdf-file:close http://www.lua.org/manual/5.2/manual.html#pdf-os.execute