Looking at the documentation that is written for these two functions[3] makes them sound like they are actually internal functions for which I do not see the purpose of them. ie why would the C API have functions to generate return values for Lua calls and how would you use them?
I really do not know so any enlightenment would be gratefully received.
luaL_fileresult
This function produces the return values for file-related functions in the standard library (io.open, os.rename, file:seek, etc.).
luaL_execresult
This function produces the return values for process-related functions in the standard library (os.execute and io.close).