lua-users home
lua-l archive

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


On Sun, Feb 24, 2008 at 2:22 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>
>  As far as I understand it is safe. The API of mkstemp is not the same
>  as that of tmpnam, because the former creates the file toghether
>  with the name (as a side effect).  Once the file is created with the
>  right permissions, when you open the file later it keeps the right
>  permissions.


My suspicion was because luaconf.h closes the file and this opens
the usage to possible race conditions. In order to be safe, we would
need an api which provides the file to the user, as a file-handle, in
addition to file name.

   Eero