Stupid question ....
Gary Aitken
ah at dreamchaser.org
Tue Dec 30 16:53:24 UTC 2014
On 12/29/14 22:55, kpneal at pobox.com wrote:
> On Tue, Dec 30, 2014 at 02:05:49AM +0100, Polytropon wrote:
>> On Tue, 30 Dec 2014 01:57:02 +0100, Roland Smith wrote:
>>> On Mon, Dec 29, 2014 at 05:55:00PM -0600, William A. Mahaffey III wrote:
>>>>
>>>>
>>>> .... I have been doing 'pkg upgrades' from an rxvt shell window for
>>>> months now. They have been going mostly OK, with a few rectifiable
>>>> glitches. Is it better/recommended to do so from the 'console' CLI, i.e.
>>>> no desktop, no XFCE, etc., just plain login shell ? just checking ....
>>>
>>> I don't think pkg will care much what kind of terminal it runs on. Or what
>>> shell for that matter.
>>
>> I think the primary concern here is the observation that
>> during a "pkg upgrade", the binaries (and other files)
>> corresponding to the programs currently running will be
>> overwritten. This _might_ caus problems when the in-memory
>> image of a program doesn't "match" its on-disk counterpart
>> (for example, for loading additional stuff), but in fact,
>> I've never experienced this - I tend to use pkg from within
>> a normal X terminal (xterm).
>
> Is this even possible? I thought that binaries being executed were read-only.
> With a local filesystem you can delete the binary and install a new one
> with no problems, but the existing binary cannot be changed.
>
> At least, that's how it used to work with statically linked executables.
>
> Can anyone confirm that shared libraries and dlopen()'d objects are the
> same?
>
> I have run into this problem before, but I was running binaries out of
> AFS. AFS is ... special ... in lots of ways.
I can't confirm anything one way or the other, but way back when the in-use
file got renamed and marked for deletion when no longer in use, but was still
used ok because once accessed references are based on its i-node, not its name.
However, if a dynamic library has references to *other* dynamic libraries
which have not yet been used, and those libraries are updated, then when a use
of them is actually triggered by the already in use library they would not
match.
Someone with more in-depth knowledge may be able to verify or correct that
statement...
Gary
More information about the freebsd-questions
mailing list