C standard library
The POSIX C standard library function codice_16 can be used to safely create temporary files. For shell scripts, the system utility does the same thing.