
On Sat, 2020-07-11 at 16:55 +0200, Bernhard Voelker wrote:
On 2020-07-10 22:25, Cristian Rodríguez wrote:
you unfortunately cannot trust software to clean after themselves.. this is the sad state of things and one of the main reasons this has to be done, as long as something uses the mk*stmp* tmpn* interfaces this will continue happen. (tmpfile() now uses O_TMPFILE so it is excluded from nasties list)
A problem is when a program which creates temporary files can't know when they have to be deleted later, e.g. a mail program saving an attachment and then starting an application to display it.
The FHS and POSIX standards are very clear on this. No application should expect a file in /tmp to be there after the current execution of the application.
There's no golden rule when would be the best time to delete the file, but IMO a time-based rule (e.g. a week) is better than a reboot-based cleanup ... especially on Tumbleweed where we boot quite often due to updates.
Given the recommendations of the FHS and the hard requirement of the POSIX standard, then any reboot is _the_ perfect time to clean up /tmp, because it's the one time we can be sure there is nothing currently executing, therefore nothign can be using /tmp at that time. Regards, -- Richard Brown Linux Distribution Engineer - Future Technology Team Phone +4991174053-361 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, D-90409 Nuernberg (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org