From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1755 Path: news.gmane.org!not-for-mail From: boris brezillon Newsgroups: gmane.linux.lib.musl.general Subject: Re: ldso: dlclose. Date: Sat, 25 Aug 2012 09:54:23 +0200 Message-ID: References: <503113C5.5010206@gmail.com> <20120820004803.GA27715@brightrain.aerifal.cx> <5603ddad712718518eed1430f5d00450@exys.org> <20120823124816.GP27715@brightrain.aerifal.cx> <20120824000209.74ab2a3b@sibserver.ru> <20120823180138.GR27715@brightrain.aerifal.cx> <503732BC.1030507@gmail.com> <20120824122708.GY27715@brightrain.aerifal.cx> <50378791.4090901@gmail.com> <20120824174640.GD27715@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1345881279 1031 80.91.229.3 (25 Aug 2012 07:54:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2012 07:54:39 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1756-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 25 09:54:39 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T5BCX-0007SP-4y for gllmg-musl@plane.gmane.org; Sat, 25 Aug 2012 09:54:37 +0200 Original-Received: (qmail 18371 invoked by uid 550); 25 Aug 2012 07:54:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 18362 invoked from network); 25 Aug 2012 07:54:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Tr4+QxXkjVVE3JYajijhXGYqlXkG+rgLv5FJRDbY14Q=; b=VmtPMtuUovFNyz7LevMJACzNp2i1cHPi2FbzPYgQERIlmdW+OVl3nVhfQtabBT+CLL LH8BN8rJyioteEeu4AtrJDphHKAr8WGuPrAY1B/5hlZDoAWmZgy7mSJR5LdcBoqbD3mm gxL3hI3I90iVx1Z+smuLkrPyfV8WX/MHO2mrd4ct9tnWtjzDxwJNETeTO9h11Matf5ig VKRzxOFyNVciPsahGk029d6+aWahkVm3iftfRq7H8PLbBIztDINRmvIzmKFECMjr+ZIp LAlPTtZq1iL4BOJiy44Od/Kaqv+b5nXXmtpyekW4HTcSMb47IPwxATdg5QqZJwpy/lPA KXmw== In-Reply-To: <20120824174640.GD27715@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:1755 Archived-At: 2012/8/24 Rich Felker : > On Fri, Aug 24, 2012 at 03:54:25PM +0200, musl wrote: >> I was talking about this specific case : >> 1) unloding a plugin >> 2) updating the plugin (new plugin.so) >> 3) reloading the plugin >> >> During the whole sequence the application is up and running. >> >> Here is how I should do it if dlclose is implemented per posix : >> 1) stop the application >> 2) update the plugin >> 3) restart the application > > To clarify on "per POSIX", POSIX allows but does not require dlclose > on the last reference to remove the library from the process's address > space, but requires that this not happen if the library has been used > to resolve undefined symbols. > >> The application is not available during this sequence. > > If the application just re-execs itself rather than exiting, there is > no window during which it's unavailable. See how irssi handles the > /upgrade command for an example. That might be the cleanest way to > handle what you want to do. > This sounds interesting, I'll take a look. > Rich