In addition to returning
errno on failure. The permissible values of
tmpfile fails, are:
EINTR- if a signal was caught during the execution of tmpfile.
EMFILE- if the maximum number of file descriptors and/or the maximum number of file streams has been reached (in the process).
ENFILE- if the maximum allowable number of files is currently open (in the system).
ENOSPC- if there is no space in the file system for creating the temporary file.
EOVERFLOW- if the file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
ENOMEM- if there is insufficient memory for allocating the file stream.
The implementation of this function in Microsoft C run-time library tries to create the file in the root directory of the current drive and typically fails reporting "Access denied".