Re: [PATCH] tomoyo: remove a temporary output file

From: Masahiro Yamada
Date: Mon Jan 09 2023 - 06:37:28 EST


On Mon, Jan 9, 2023 at 7:01 PM Tetsuo Handa
<penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On 2023/01/09 18:19, Masahiro Yamada wrote:
> > Since this is a general problem, you can leave it to Kbuild instead
> > of introducing unneeded complexity.
>
> > If it is not too late, please squash this.
>
> It is not too late to apply. But how do you handle a case where
> the process who is responsible for deleting incomplete file was
> killed by e.g. OOM-killer?
>


Good point.
That is a rare case that Kbuild cannot handle.

One idea is to make if_changed to write the command to *.cmd.tmp
and rename it to *.cmd after everything succeeds.
So, it is a similar approach, but the difference is that
it is done in the Kbuild core scripts instead of every command.
I will consider it.


--
Best Regards

Masahiro Yamada