I have a program which uses temporary files, created using the mkstemps
function. The files are created inside the /tmp
directory.
Does these files get removed automatically on program exit?
I'm wondering if my program should remove these files before exit. If they aren't removed automatically, is it acceptable to not remove them, and have them remain in /tmp
? Or is it better practice to remove them using unlink
or remove
before program exit?