Mktemp creates a unique file name and returns the address of the template. The template should contain a file name with trailing X's, nor-
mally something like /tmp/tempXXXXXX. The X's are replaced by the current process number and/or a unique letter combination. Mkstemp
makes the same replacement to the template but opens the template file and returns a file descriptor open for reading and writing. Mkstemp
avoids the race between testing whether the file exists and opening it for use. The number of file name combinations mktemp and mkstemp
will try depends on the number of X's placed on the end of the template; six X's will result in them trying roughly 26 ** 6 combinations.