05.12.2024 02:05, Vincent Lefevre wrote:

OK, but I'm still a bit uncomfortable with the fact that the
implementation of cp is not specified (at least some missing
guarantee that several cp's of the same file to the same target
is OK). In the past, I had bad surprised with concurrent writes,
but this could have been more complex cases (in my archives I can
only find an issue with the zsh history, but truncate operations
were also involved).

it's definitely a more complex case. There's no way you can get
different result by running multiple `cp a b` in parallel, -
they will be writing the same data to the same places, with the
end result being the same.

BTW, I'm wondering whether when a second interface is brought up,
/etc/resolv.conf could be modified, which would also be a problem.
That could happen to, in some theory.  It's now a question how
resolv.conf itself is updated - here, it is much more important
to guard against multiple updates from DIFFERENT destinations.
So if things are running in parallel there, there's a much more
serious bug somewhere.

Anyway.

Today, with big shift from /etc/network/interfaces towards
systemd-networkd or network-manager, so parallel execution
of things managed by if-up.d/ et al becomes significantly
less probable, I'm not going to spend more time on this.

Also, a good advise here is to not run postfix chrooted to
begin with, as upstream pleaded for decades.

So I don't really see a point anymore.

Thanks,

/mjt

Reply via email to