lua-users home
lua-l archive

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


> > handle = mkstemp(filename)
>
>     **** race condition here! If the process' umask isn't set correctly,
>          another process might open the file. ****

Oops, right. You have to call umask first.

> tmpfile() is a better option; it's defined to do this stuff *for* you, so
> you don't have to, and risk getting it wrong.

Problem is that in some libraries it does not. :-(

So, what can one do?

- Christian