[systemd-devel] Antw: Re: Antw: [EXT] [systemd‑devel] systemd‑tmpfiles: behavior of ‑‑clean

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Wed Aug 31 09:41:56 UTC 2022


>>> Wols Lists <antlists at youngman.org.uk> schrieb am 31.08.2022 um 09:25 in
Nachricht <6c25970f-c7cb-2728-a827-1452e193762d at youngman.org.uk>:
> On 31/08/2022 07:16, Ulrich Windl wrote:
>>> 'tomcat.<####>' with other associated files (or directories below this).
> 
>> I think with the guideline "clean up your own dirt" there wouldn't be so 
> much
>> need for external cleanup if the applications would do a better job. The
>> application always knows best what, how, and when to clean up. (MHO)
>> 
> Always? Sometimes the application doesn't have a clue!

If you write an app and you don't know what temporary data you create or need, you have a big problem!

> 
> Simple example, your system crashes (or a thread exits with a crash, 
> security violation, out-of-mem, whatever). Why on earth should the 
> *application* have a clue about what that crashed process was doing? If 

35 years ago vi knew.

> (as is the case with tomcat) it was carrying out a user request, all 
> state has gone.

Then put "volatile" files in a separate directory and wipe that before start.
Other data should be recovered from their location.
It's all a design issue.

> 
> And even within the application you can't just come along and clean up 
> stuff that doesn't belong to you because another thread might own it and 

Wha said the application should clean up "foreign" stuff?

> be most upset when it disappears. Truly, the sysadmin often *does* know 
> best.

But the sysadmin is not an automatic job ;-)

> 
> Cheers,
> Wol






More information about the systemd-devel mailing list