Looking at how mkstemp is used in luaconf.h is it any safer than using tmpnam? I get the feeling that the problem is in the tmpname API, and that cannot really be fixed. A better API should be added. Eero