Generate a temporary file name
ns_tmpnam generates a filename that can safely be used for a temporary file. ns_tmpnam calls tmpnam(), and the results will depend on your operating system. On Irix, for example, tmpnam() always generates a file name using the path-prefix defined as P_tmpdir in the <stdio.h> header file, which is "/var/tmp/".
Alternatively, you can use the ns_mktemp function to create a unique file name.