According to the luaposix doc, a successful call to function mkstemp() returns
int open file descriptor
But I noticed that it also returns the created file name as second value, which is very convenient. Is it just a documentation error, in other words, can I rely on this behaviour, or not?
You can rely on this behavior. The 'Or' in the mkstemp documentation comes a line too early - before the next release, I'll fix it to correctly read...
- int open file descriptor
- string path to file, if successful
- string error message
- int errnum