lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Bernd,

On Feb 13, 2017, at 7:08 AM, Bernd Eggink <> wrote:

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...


    1. int open file descriptor
    1. string path to file, if successful


  1. nil
  2. string error message
  3. int errnum

-- Bernd