[systemd-devel] Antw: Re: Antw: Re: Binary changed since start

Lennart Poettering lennart at poettering.net
Thu Dec 12 10:37:04 UTC 2019


On Do, 12.12.19 07:53, Ulrich Windl (Ulrich.Windl at rz.uni-regensburg.de) wrote:

> >> > Well. This specifically may be doable by checking if any file open by
> >> > process is marked deleted, but would not work if the file was just
> >> > rewritten...
> >>
> >> Did you ever try to overwrite a dynmically loaded file? I doubt it
> >> is possible for obvious reasons.
> >
> > Your package manager does that all the time. It's possible and common
> > case.
>
> Seems you are all MS-Windows guys: If the package manager would overwrite
> existing files, there'd be no reason to restart any process. What the package
> manager does is to unlink the name from the inode and then recreate a new inode
> assigning the same name. If you don't understand this difference, you don't
> understand how UNIX works. I'm kind of shocked to read such nonsense in this
> list.

Oh, man, you are getting on my nerves. So first of all, in systemd all
regular files we ever write are written in this "atomic style",
i.e. write out the new version under a temporary name, and move it
into place with rename() atomically.

Secondly, your premise that "if the package manager would overwrite
existing files, there'd be no reason to restart any process" (by which
you apparently mean "keep the inode, overwrite blocks") is just
so weird, that I don't even know where to start...

Anyway, every now and then please assume we are not complete
fools. Thank you,

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list