From owner-freebsd-questions@FreeBSD.ORG Tue Dec 30 16:53:24 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 710108A6 for ; Tue, 30 Dec 2014 16:53:24 +0000 (UTC) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E90E2B7B for ; Tue, 30 Dec 2014 16:53:23 +0000 (UTC) Received: from breakaway.dreamchaser.org (breakaway.dreamchaser.org. [192.168.151.122]) by nightmare.dreamchaser.org (8.13.6/8.13.6) with ESMTP id sBUGlbjw088070; Tue, 30 Dec 2014 09:47:40 -0700 (MST) (envelope-from ah@dreamchaser.org) Message-ID: <54A2D729.3010701@dreamchaser.org> Date: Tue, 30 Dec 2014 09:47:37 -0700 From: Gary Aitken User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: kpneal@pobox.com, Polytropon Subject: Re: Stupid question .... References: <54A1E9D4.60504@hiwaay.net> <20141230005702.GB2910@slackbox.erewhon.home> <20141230020549.cc26aa46.freebsd@edvax.de> <20141230055551.GB5839@neutralgood.org> In-Reply-To: <20141230055551.GB5839@neutralgood.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (nightmare.dreamchaser.org [192.168.151.101]); Tue, 30 Dec 2014 09:47:42 -0700 (MST) Cc: Roland Smith , "William A. Mahaffey III" , FreeBSD Questions !!!! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2014 16:53:24 -0000 On 12/29/14 22:55, kpneal@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